aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
Diffstat (limited to 'js/mediators')
-rwxr-xr-xjs/mediators/element-mediator.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index ad01fe2d..559cb44c 100755
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -102,7 +102,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
102 el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); 102 el.elementModel.controller["set3DProperties"](el, [p3d], 0, true);
103 } 103 }
104 if(!noEvent) { 104 if(!noEvent) {
105 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 105 this.application.ninja.documentController.activeDocument.markDocumentEditted();
106 NJevent("elementAdded", el); 106 NJevent("elementAdded", el);
107 } 107 }
108 } 108 }
@@ -130,7 +130,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
130 _removeElement: { 130 _removeElement: {
131 value: function(el, rules) { 131 value: function(el, rules) {
132 ElementController.removeElement(el, rules); 132 ElementController.removeElement(el, rules);
133 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 133 this.application.ninja.documentController.activeDocument.markDocumentEditted();
134 NJevent("elementDeleted", el); 134 NJevent("elementDeleted", el);
135 } 135 }
136 }, 136 },
@@ -189,7 +189,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
189 NJUtils.makeElementModel(el, "Canvas", "block", true); 189 NJUtils.makeElementModel(el, "Canvas", "block", true);
190 } 190 }
191 191
192 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 192 this.application.ninja.documentController.activeDocument.markDocumentEditted();
193 193
194 return el.elementModel.controller["setShapeProperty"](el, prop, value); 194 return el.elementModel.controller["setShapeProperty"](el, prop, value);
195 } 195 }
@@ -258,7 +258,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
258 258
259 item.elementModel.controller["setAttribute"](item, att, value); 259 item.elementModel.controller["setAttribute"](item, att, value);
260 260
261 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 261 this.application.ninja.documentController.activeDocument.markDocumentEditted();
262 262
263 NJevent("attribute" + eventType, {type : "setAttribute", source: source, data: {"els": el, "prop": att, "value": value}, redraw: null}); 263 NJevent("attribute" + eventType, {type : "setAttribute", source: source, data: {"els": el, "prop": att, "value": value}, redraw: null});
264 } 264 }
@@ -332,7 +332,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
332 el.elementModel.controller["setProperty"](el, p, value[i]); 332 el.elementModel.controller["setProperty"](el, p, value[i]);
333 } 333 }
334 334
335 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 335 this.application.ninja.documentController.activeDocument.markDocumentEditted();
336 336
337 NJevent("element" + eventType, {type : "setProperty", source: source, data: {"els": els, "prop": p, "value": value}, redraw: null}); 337 NJevent("element" + eventType, {type : "setProperty", source: source, data: {"els": els, "prop": p, "value": value}, redraw: null});
338 } 338 }
@@ -393,7 +393,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
393 el.elementModel.controller["setProperties"](el, props, i); 393 el.elementModel.controller["setProperties"](el, props, i);
394 } 394 }
395 395
396 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 396 this.application.ninja.documentController.activeDocument.markDocumentEditted();
397 397
398 NJevent("element" + eventType, {type : "setProperties", source: source, data: {"els": els, "prop": props, "value": props}, redraw: null}); 398 NJevent("element" + eventType, {type : "setProperties", source: source, data: {"els": els, "prop": props, "value": props}, redraw: null});
399 } 399 }
@@ -467,7 +467,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
467 el.elementModel.controller["set3DProperties"](el, props, i, update3DModel); 467 el.elementModel.controller["set3DProperties"](el, props, i, update3DModel);
468 } 468 }
469 469
470 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 470 this.application.ninja.documentController.activeDocument.markDocumentEditted();
471 471
472 NJevent("element" + eventType, {type : "set3DProperties", source: source, data: {"els": els, "prop": "matrix", "value": props}, redraw: null}); 472 NJevent("element" + eventType, {type : "set3DProperties", source: source, data: {"els": els, "prop": "matrix", "value": props}, redraw: null});
473 } 473 }
@@ -553,7 +553,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
553 el.elementModel.controller["setColor"](el, value, isFill); 553 el.elementModel.controller["setColor"](el, value, isFill);
554 } 554 }
555 555
556 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 556 this.application.ninja.documentController.activeDocument.markDocumentEditted();
557 557
558 NJevent("element" + eventType, {type : "setColor", source: source, data: {"els": els, "prop": "color", "value": value, "isFill": isFill}, redraw: null}); 558 NJevent("element" + eventType, {type : "setColor", source: source, data: {"els": els, "prop": "color", "value": value, "isFill": isFill}, redraw: null});
559 } 559 }
@@ -636,7 +636,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
636 el.elementModel.controller["setStroke"](el, value); 636 el.elementModel.controller["setStroke"](el, value);
637 } 637 }
638 638
639 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 639 this.application.ninja.documentController.activeDocument.markDocumentEditted();
640 640
641 NJevent("element" + eventType, {type : "setStroke", source: source, data: {"els": els, "prop": "stroke", "value": value}, redraw: null}); 641 NJevent("element" + eventType, {type : "setStroke", source: source, data: {"els": els, "prop": "stroke", "value": value}, redraw: null});
642 } 642 }
@@ -712,7 +712,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
712 } 712 }
713 else 713 else
714 { 714 {
715 this.application.ninja.documentController.activeDocument.dirtyFlag = true; 715 this.application.ninja.documentController.activeDocument.markDocumentEditted();
716 716
717 NJevent("elementChange", {type : "setMatrix", source: null, data: {"els": [el], "prop": "matrix", "value": mat}, redraw: null}); 717 NJevent("elementChange", {type : "setMatrix", source: null, data: {"els": [el], "prop": "matrix", "value": mat}, redraw: null});
718 } 718 }