aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/document/text-document.js6
-rwxr-xr-xjs/mediators/element-mediator.js20
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js4
3 files changed, 15 insertions, 15 deletions
diff --git a/js/document/text-document.js b/js/document/text-document.js
index f74742ad..5c731bcf 100755
--- a/js/document/text-document.js
+++ b/js/document/text-document.js
@@ -26,7 +26,7 @@ var TextDocument = exports.TextDocument = Montage.create(Montage, {
26 // PRIVATE MEMBERS 26 // PRIVATE MEMBERS
27 _codeEditor: { 27 _codeEditor: {
28 value: { 28 value: {
29 "editor": { value: null, enumerable: false }, 29 "editor": { value: null, enumerable: false }
30 30
31 } 31 }
32 }, 32 },
@@ -193,13 +193,13 @@ var TextDocument = exports.TextDocument = Montage.create(Montage, {
193 } 193 }
194 }, 194 },
195 195
196 markDocumentEditted:{ 196 markEdited:{
197 value: function() { 197 value: function() {
198 this.dirtyFlag = true; 198 this.dirtyFlag = true;
199 } 199 }
200 }, 200 },
201 201
202 markDocumentUneditted:{ 202 markUnedited:{
203 value: function() { 203 value: function() {
204 this.dirtyFlag = false; 204 this.dirtyFlag = false;
205 } 205 }
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index 559cb44c..7dad7aca 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.markDocumentEditted(); 105 this.application.ninja.documentController.activeDocument.markEdited();
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.markDocumentEditted(); 133 this.application.ninja.documentController.activeDocument.markEdited();
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.markDocumentEditted(); 192 this.application.ninja.documentController.activeDocument.markEdited();
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.markDocumentEditted(); 261 this.application.ninja.documentController.activeDocument.markEdited();
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.markDocumentEditted(); 335 this.application.ninja.documentController.activeDocument.markEdited();
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.markDocumentEditted(); 396 this.application.ninja.documentController.activeDocument.markEdited();
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.markDocumentEditted(); 470 this.application.ninja.documentController.activeDocument.markEdited();
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.markDocumentEditted(); 556 this.application.ninja.documentController.activeDocument.markEdited();
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.markDocumentEditted(); 639 this.application.ninja.documentController.activeDocument.markEdited();
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.markDocumentEditted(); 715 this.application.ninja.documentController.activeDocument.markEdited();
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 }
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
index 7ee41fb4..0b74105c 100755
--- a/js/stage/stage-view.reel/stage-view.js
+++ b/js/stage/stage-view.reel/stage-view.js
@@ -98,9 +98,9 @@ exports.StageView = Montage.create(Component, {
98 onChange: function(){ 98 onChange: function(){
99 var historySize = doc.editor.historySize(); 99 var historySize = doc.editor.historySize();
100 if(historySize.undo>0){ 100 if(historySize.undo>0){
101 doc.markDocumentEditted(); 101 doc.markEdited();
102 }else if(historySize.undo===0 && historySize.redo>0){ 102 }else if(historySize.undo===0 && historySize.redo>0){
103 doc.markDocumentUneditted(); 103 doc.markUnedited();
104 } 104 }
105 }, 105 },
106 onCursorActivity: function() { 106 onCursorActivity: function() {