// add this adjacency into the current edges object
adjsObj[obj2.id].push(adj);
- if (adj.nodeFrom.data["$type"] != "swtch") {
+ if (adj.nodeFrom.data["$type"] != "switch") {
// if this is not a switch (e.g. host), then add it to the switch because it will never be added by itself
adjsObj2[obj.id].push(adj);
}
&& Math.abs(pos.y - npos.y) <= height / 2;
}
},
- 'swtch': {
+ 'switch': {
'render': function(pos, canvas, animating) {
var ctx = canvas.getCtx();
var img = new Image();
return this.nodeHelper.host.contains(npos, pos);
}
},
- 'swtch': {
+ 'switch': {
'render': function(node, canvas, animating) {
var pos = node.pos.getc(true);
- this.nodeHelper.swtch.render(pos, canvas, animating);
+ this.nodeHelper.switch.render(pos, canvas, animating);
},
'contains': function(node, pos) {
var npos = node.pos.getc(true);
- return this.nodeHelper.swtch.contains(npos, pos);
+ return this.nodeHelper.switch.contains(npos, pos);
}
}
});
},
label : function(style, node) {
var marginTop, minWidth;
- if (node.data["$type"] == "swtch") {
+ if (node.data["$type"] == "switch") {
marginTop = "42px";
minWidth = "65px";
} else if (node.data["$type"] == "host") {
if (node.id != undefined) {
one.topology.graph.canvas.getElement().style.cursor = 'move';
} else if (eventInfo.edge != undefined
- && eventInfo.edge.nodeTo.data["$type"] == "swtch"
- && eventInfo.edge.nodeFrom.data["$type"] == "swtch") {
+ && eventInfo.edge.nodeTo.data["$type"] == "switch"
+ && eventInfo.edge.nodeFrom.data["$type"] == "switch") {
one.topology.graph.canvas.getElement().style.cursor = 'pointer';
}
},