|
@ -330,7 +330,7 @@ exports._handleConnect = function(pointer) { |
|
|
var node = this._getNodeAt(pointer); |
|
|
var node = this._getNodeAt(pointer); |
|
|
if (node != null) { |
|
|
if (node != null) { |
|
|
if (node.clusterSize > 1) { |
|
|
if (node.clusterSize > 1) { |
|
|
alert("Cannot create edges to a cluster.") |
|
|
|
|
|
|
|
|
alert(this.constants.labels["createEdgeError"]) |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
this._selectObject(node,false); |
|
|
this._selectObject(node,false); |
|
@ -386,7 +386,7 @@ exports._finishConnect = function(pointer) { |
|
|
var node = this._getNodeAt(pointer); |
|
|
var node = this._getNodeAt(pointer); |
|
|
if (node != null) { |
|
|
if (node != null) { |
|
|
if (node.clusterSize > 1) { |
|
|
if (node.clusterSize > 1) { |
|
|
alert("Cannot create edges to a cluster.") |
|
|
|
|
|
|
|
|
alert(this.constants.labels["createEdgeError"]) |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
this._createEdge(connectFromId,node.id); |
|
|
this._createEdge(connectFromId,node.id); |
|
@ -416,7 +416,7 @@ exports._addNode = function() { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
alert(this.constants.labels['addError']); |
|
|
|
|
|
|
|
|
throw new Error(this.constants.labels['addError']); |
|
|
this._createManipulatorBar(); |
|
|
this._createManipulatorBar(); |
|
|
this.moving = true; |
|
|
this.moving = true; |
|
|
this.start(); |
|
|
this.start(); |
|
@ -450,7 +450,7 @@ exports._createEdge = function(sourceNodeId,targetNodeId) { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
alert(this.constants.labels["linkError"]); |
|
|
|
|
|
|
|
|
throw new Error(this.constants.labels["linkError"]); |
|
|
this.moving = true; |
|
|
this.moving = true; |
|
|
this.start(); |
|
|
this.start(); |
|
|
} |
|
|
} |
|
@ -481,7 +481,7 @@ exports._editEdge = function(sourceNodeId,targetNodeId) { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
alert(this.constants.labels["linkError"]); |
|
|
|
|
|
|
|
|
throw new Error(this.constants.labels["linkError"]); |
|
|
this.moving = true; |
|
|
this.moving = true; |
|
|
this.start(); |
|
|
this.start(); |
|
|
} |
|
|
} |
|
@ -524,11 +524,11 @@ exports._editNode = function() { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
alert(this.constants.labels["editError"]); |
|
|
|
|
|
|
|
|
throw new Error(this.constants.labels["editError"]); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
alert(this.constants.labels["editBoundError"]); |
|
|
|
|
|
|
|
|
throw new Error(this.constants.labels["editBoundError"]); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
@ -558,7 +558,7 @@ exports._deleteSelected = function() { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
alert(this.constants.labels["deleteError"]) |
|
|
|
|
|
|
|
|
throw new Error(this.constants.labels["deleteError"]) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|