diff options
author | Ananya Sen | 2012-02-17 11:26:02 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-17 11:26:02 -0800 |
commit | 3b862fe489a3320882f91ab56781fc5dc400c3d1 (patch) | |
tree | a3ae24b1427246801c2c6782c06637b40c6b8505 /js/mediators | |
parent | f3b6a62f110be31a9438a6172694b111ffd4d507 (diff) | |
download | ninja-3b862fe489a3320882f91ab56781fc5dc400c3d1.tar.gz |
changed the document dirtying logic to be done in the feature that edits the document.
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/element-mediator.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 95aec2a3..e1eadda9 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -101,7 +101,10 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
101 | { | 101 | { |
102 | el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); | 102 | el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); |
103 | } | 103 | } |
104 | if(!noEvent) NJevent("elementAdded", el); | 104 | if(!noEvent) { |
105 | this.application.ninja.documentController.activeDocument.dirtyFlag = true; | ||
106 | NJevent("elementAdded", el); | ||
107 | } | ||
105 | } | 108 | } |
106 | }, | 109 | }, |
107 | 110 | ||
@@ -127,6 +130,7 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
127 | _removeElement: { | 130 | _removeElement: { |
128 | value: function(el, rules) { | 131 | value: function(el, rules) { |
129 | ElementController.removeElement(el, rules); | 132 | ElementController.removeElement(el, rules); |
133 | this.application.ninja.documentController.activeDocument.dirtyFlag = true; | ||
130 | NJevent("elementDeleted", el); | 134 | NJevent("elementDeleted", el); |
131 | } | 135 | } |
132 | }, | 136 | }, |