aboutsummaryrefslogtreecommitdiff
path: root/js/mediators/element-mediator.js
diff options
context:
space:
mode:
authorhwc4872012-05-31 17:11:08 -0700
committerhwc4872012-05-31 17:11:08 -0700
commit1c445cf5d905f79937998cf2f1115594ea8c1074 (patch)
tree35271ad7ffec86fde9102af3dd954fa3a2974582 /js/mediators/element-mediator.js
parent335ce503996e3ccbd2909086328d0a31fbd03370 (diff)
parent6042bdc5f2aada4412912fd01602d32c9088dc26 (diff)
downloadninja-1c445cf5d905f79937998cf2f1115594ea8c1074.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts: js/io/system/ninjalibrary.json
Diffstat (limited to 'js/mediators/element-mediator.js')
-rwxr-xr-xjs/mediators/element-mediator.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index 020f875f..7657112f 100755
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -54,7 +54,7 @@ exports.ElementMediator = Montage.create(Component, {
54 54
55 document.application.undoManager.add(undoLabel, this.removeElements, this, elements, notify); 55 document.application.undoManager.add(undoLabel, this.removeElements, this, elements, notify);
56 56
57 this.application.ninja.documentController.activeDocument.needsSave = true; 57 this.application.ninja.documentController.activeDocument.model.needsSave = true;
58 58
59 if(notify || notify === undefined) { 59 if(notify || notify === undefined) {
60 NJevent("elementAdded", elements); 60 NJevent("elementAdded", elements);
@@ -83,7 +83,7 @@ exports.ElementMediator = Montage.create(Component, {
83 83
84 document.application.undoManager.add(undoLabel, this.addElements, this, elements, null, notify); 84 document.application.undoManager.add(undoLabel, this.addElements, this, elements, null, notify);
85 85
86 this.application.ninja.documentController.activeDocument.needsSave = true; 86 this.application.ninja.documentController.activeDocument.model.needsSave = true;
87 87
88 NJevent("elementsRemoved", elements); 88 NJevent("elementsRemoved", elements);
89 } 89 }
@@ -92,13 +92,13 @@ exports.ElementMediator = Montage.create(Component, {
92 replaceElement: { 92 replaceElement: {
93 value: function(newChild, oldChild, notify) { 93 value: function(newChild, oldChild, notify) {
94 94
95 this.application.ninja.currentDocument.documentRoot.replaceChild(newChild, oldChild); 95 this.application.ninja.currentDocument.model.documentRoot.replaceChild(newChild, oldChild);
96 96
97 var undoLabel = "replace element"; 97 var undoLabel = "replace element";
98 98
99 document.application.undoManager.add(undoLabel, this.replaceElement, this, oldChild, newChild); 99 document.application.undoManager.add(undoLabel, this.replaceElement, this, oldChild, newChild);
100 100
101 this.application.ninja.documentController.activeDocument.needsSave = true; 101 this.application.ninja.documentController.activeDocument.model.needsSave = true;
102 102
103 if(notify || notify === undefined) { 103 if(notify || notify === undefined) {
104 NJevent("elementReplaced", {type : "replaceElement", data: {"newChild": newChild, "oldChild": oldChild}}); 104 NJevent("elementReplaced", {type : "replaceElement", data: {"newChild": newChild, "oldChild": oldChild}});
@@ -526,7 +526,7 @@ exports.ElementMediator = Montage.create(Component, {
526 value: function(layersDraggedArray, layerDroppedAfter) { 526 value: function(layersDraggedArray, layerDroppedAfter) {
527 var documentRoot,length; 527 var documentRoot,length;
528 528
529 documentRoot = this.application.ninja.currentDocument.documentRoot; 529 documentRoot = this.application.ninja.currentDocument.model.documentRoot;
530 length = layersDraggedArray.length; 530 length = layersDraggedArray.length;
531 531
532 for(var i=0; documentRoot.children[i]; i++) { 532 for(var i=0; documentRoot.children[i]; i++) {