summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f2a4c98)
Checking for existence on canvas should be performed only if
handling nodeMoved event.
var canvasNode = utils.findCanvasElement(event.meta.node);
canvasNode.setWlxmlTag(event.meta.newTagName);
},
var canvasNode = utils.findCanvasElement(event.meta.node);
canvasNode.setWlxmlTag(event.meta.newTagName);
},
- nodeAdded: function(event) {
+ nodeAdded: function(event, checkForExistence) {
if(event.meta.node.isRoot()) {
this.canvas.reloadRoot();
return;
if(event.meta.node.isRoot()) {
this.canvas.reloadRoot();
return;
referenceAction = 'after';
}
referenceAction = 'after';
}
- actionArg = utils.findCanvasElement(event.meta.node) || event.meta.node;
+ actionArg = (checkForExistence && utils.findCanvasElement(event.meta.node)) || event.meta.node;
referenceElement[referenceAction](actionArg);
},
nodeMoved: function(event) {
referenceElement[referenceAction](actionArg);
},
nodeMoved: function(event) {
- return handlers.nodeAdded(event);
+ return handlers.nodeAdded(event, true);
},
nodeDetached: function(event) {
var canvasNode = utils.findCanvasElementInParent(event.meta.node, event.meta.parent);
},
nodeDetached: function(event) {
var canvasNode = utils.findCanvasElementInParent(event.meta.node, event.meta.parent);