- if(event.type === 'nodeMoved') {
- /* globals Node */
- if(event.meta.node.nodeType === Node.TEXT_NODE) {
- actionArg = utils.getElementForTextNode(event.meta.node);
- } else {
- actionArg = utils.getElementForNode(event.meta.node);
+ 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];