aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-04-04 16:47:51 -0700
committerNivesh Rajbhandari2012-04-04 16:47:51 -0700
commit13368ca6ebbc13adeafccd898dfffd7ce37cb28a (patch)
treefb45f74ede82a32d686a38e71f2c42c5d2ff9370 /js/mediators
parent488afcf1604df3d611eca5253d57cc5a79ed80c3 (diff)
parent8b60a68f0152c609ad94a931472680f313678d8d (diff)
downloadninja-13368ca6ebbc13adeafccd898dfffd7ce37cb28a.tar.gz
Merge branch 'refs/heads/WebGLFileIO' into ToolFixes
Conflicts: assets/canvas-runtime.js js/controllers/elements/shapes-controller.js js/lib/drawing/world.js js/lib/geom/geom-obj.js js/lib/geom/line.js js/mediators/element-mediator.js js/panels/presets/animations-presets.reel/animations-presets.js js/panels/presets/style-presets.reel/style-presets.js js/panels/presets/transitions-presets.reel/transitions-presets.js Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/mediators')
-rwxr-xr-xjs/mediators/element-mediator.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index b0efc02b..3a9055e8 100755
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -38,12 +38,12 @@ exports.ElementMediator = Montage.create(Component, {
38 var prop3d = this.get3DProperties(elements); 38 var prop3d = this.get3DProperties(elements);
39 if(prop3d) { 39 if(prop3d) {
40 elements.elementModel.controller["set3DProperties"](elements, [prop3d], 0, true); 40 elements.elementModel.controller["set3DProperties"](elements, [prop3d], 0, true);
41 } 41 }
42 } 42 }
43 43
44 if(this.addDelegate && typeof (this.addDelegate['onAddElements']) === "function") { 44 if(this.addDelegate && typeof (this.addDelegate['onAddElements']) === "function") {
45 this.addDelegate['onAddElements'].call(this.addDelegate, elements); 45 this.addDelegate['onAddElements'].call(this.addDelegate, elements);
46 } 46 }
47 47
48 var undoLabel = "add element"; 48 var undoLabel = "add element";
49 49
@@ -53,9 +53,9 @@ exports.ElementMediator = Montage.create(Component, {
53 53
54 if(notify || notify === undefined) { 54 if(notify || notify === undefined) {
55 NJevent("elementAdded", elements); 55 NJevent("elementAdded", elements);
56 } 56 }
57 } 57 }
58 }, 58 },
59 59
60 removeElements: { 60 removeElements: {
61 value: function(elements, notify /* Used for the add undo */) { 61 value: function(elements, notify /* Used for the add undo */) {
@@ -63,7 +63,7 @@ exports.ElementMediator = Montage.create(Component, {
63 if(this.deleteDelegate && (typeof this.deleteDelegate.handleDelete === 'function')) { 63 if(this.deleteDelegate && (typeof this.deleteDelegate.handleDelete === 'function')) {
64 return this.deleteDelegate.handleDelete(); 64 return this.deleteDelegate.handleDelete();
65 // this.handleDelete.call(deleteDelegate); 65 // this.handleDelete.call(deleteDelegate);
66 } 66 }
67 67
68 if(Array.isArray(elements)) { 68 if(Array.isArray(elements)) {
69 elements = Array.prototype.slice.call(elements, 0); 69 elements = Array.prototype.slice.call(elements, 0);
@@ -78,10 +78,10 @@ exports.ElementMediator = Montage.create(Component, {
78 78
79 document.application.undoManager.add(undoLabel, this.addElements, this, elements, null, notify); 79 document.application.undoManager.add(undoLabel, this.addElements, this, elements, null, notify);
80 80
81 this.application.ninja.documentController.activeDocument.needsSave = true; 81 this.application.ninja.documentController.activeDocument.needsSave = true;
82 82
83 NJevent("elementsRemoved", elements); 83 NJevent("elementsRemoved", elements);
84 } 84 }
85 }, 85 },
86 86
87 replaceElement: { 87 replaceElement: {
@@ -97,8 +97,8 @@ exports.ElementMediator = Montage.create(Component, {
97 97
98 if(notify || notify === undefined) { 98 if(notify || notify === undefined) {
99 NJevent("elementReplaced", {type : "replaceElement", data: {"newChild": newChild, "oldChild": oldChild}}); 99 NJevent("elementReplaced", {type : "replaceElement", data: {"newChild": newChild, "oldChild": oldChild}});
100 }
101 } 100 }
101 }
102 }, 102 },
103 103
104 getProperty: { 104 getProperty: {
@@ -265,7 +265,7 @@ exports.ElementMediator = Montage.create(Component, {
265 var el; 265 var el;
266 266
267 for(var i=0, item; item = els[i]; i++) { 267 for(var i=0, item; item = els[i]; i++) {
268 item.elementModel.controller["setProperty"](item, p, value[i]); 268 item.elementModel.controller["setProperty"](item, p, value[i], eventType, source);
269 } 269 }
270 270
271 NJevent("element" + eventType, {type : "setProperty", source: source, data: {"els": els, "prop": p, "value": value}, redraw: null}); 271 NJevent("element" + eventType, {type : "setProperty", source: source, data: {"els": els, "prop": p, "value": value}, redraw: null});
@@ -621,8 +621,8 @@ exports.ElementMediator = Montage.create(Component, {
621 value: function(el) { 621 value: function(el) {
622 var str = this.getProperty(el, "-webkit-transform"); 622 var str = this.getProperty(el, "-webkit-transform");
623 return str && str.length; 623 return str && str.length;
624 } 624 }
625 } 625 }
626 626
627 627
628 628