diff options
author | Jose Antonio Marquez | 2012-02-21 18:04:27 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-21 18:04:27 -0800 |
commit | 25e6a03cf8af4bd0496a8b21c82332d76ddd9fff (patch) | |
tree | 9b4ef3a716139d5259261cae97e8603a1d33a91f /js/mediators/element-mediator.js | |
parent | 20dc41e571ddec6b781653fac43e2ca34026937d (diff) | |
parent | 2f24dafec79583547fe663d5a387d8ef15aae3bf (diff) | |
download | ninja-25e6a03cf8af4bd0496a8b21c82332d76ddd9fff.tar.gz |
Merge branch 'refs/heads/NinjaInternal' into Color
Diffstat (limited to 'js/mediators/element-mediator.js')
-rwxr-xr-x | js/mediators/element-mediator.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 95aec2a3..51923f08 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -28,13 +28,7 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
28 | // TODO use the specific controller to be able to subclass the functionality | 28 | // TODO use the specific controller to be able to subclass the functionality |
29 | handleElementAdding: { | 29 | handleElementAdding: { |
30 | value: function(event) { | 30 | value: function(event) { |
31 | /* | ||
32 | var cmd = ElementControllerCommands.addElementCommand(event.detail.el, event.detail.data); | ||
33 | NJevent("sendToUndo", cmd); | ||
34 | cmd.execute(); | ||
35 | */ | ||
36 | this.addElement(event.detail.el, event.detail.data); | 31 | this.addElement(event.detail.el, event.detail.data); |
37 | |||
38 | } | 32 | } |
39 | }, | 33 | }, |
40 | 34 | ||
@@ -97,11 +91,13 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
97 | value: function(el, rules, noEvent) { | 91 | value: function(el, rules, noEvent) { |
98 | ElementController.addElement(el, rules); | 92 | ElementController.addElement(el, rules); |
99 | var p3d = this.get3DProperties(el); | 93 | var p3d = this.get3DProperties(el); |
100 | if(p3d) | 94 | if(p3d) { |
101 | { | ||
102 | el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); | 95 | el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); |
103 | } | 96 | } |
104 | if(!noEvent) NJevent("elementAdded", el); | 97 | if(!noEvent) { |
98 | this.application.ninja.documentController.activeDocument.needsSave = true; | ||
99 | NJevent("elementAdded", el); | ||
100 | } | ||
105 | } | 101 | } |
106 | }, | 102 | }, |
107 | 103 | ||
@@ -127,6 +123,7 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
127 | _removeElement: { | 123 | _removeElement: { |
128 | value: function(el, rules) { | 124 | value: function(el, rules) { |
129 | ElementController.removeElement(el, rules); | 125 | ElementController.removeElement(el, rules); |
126 | this.application.ninja.documentController.activeDocument.needsSave = true; | ||
130 | NJevent("elementDeleted", el); | 127 | NJevent("elementDeleted", el); |
131 | } | 128 | } |
132 | }, | 129 | }, |