- if(event.type === 'nodeMoved') {
- actionArg = utils.getElementForNode(event.meta.node, event.meta.parent);
- } else {
+ if(event.meta.move) {
+ /* Let's check if this node had its own canvas element and it's accessible. */
+ actionArg = utils.getElementForElementRootNode(event.meta.node);
+ if(actionArg && actionArg.sameNode(referenceElement)) {
+ referenceElement = this.children()[nodeIndex];
+ }
+ }
+ if(!actionArg) {