From 96178309ddcdb54c0c451b69ea6fb8cdf76fcf62 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Fri, 17 Feb 2012 12:54:07 -0800 Subject: renamed methods to use better words Signed-off-by: Ananya Sen --- js/document/text-document.js | 6 +++--- js/mediators/element-mediator.js | 20 ++++++++++---------- js/stage/stage-view.reel/stage-view.js | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'js') 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, { // PRIVATE MEMBERS _codeEditor: { value: { - "editor": { value: null, enumerable: false }, + "editor": { value: null, enumerable: false } } }, @@ -193,13 +193,13 @@ var TextDocument = exports.TextDocument = Montage.create(Montage, { } }, - markDocumentEditted:{ + markEdited:{ value: function() { this.dirtyFlag = true; } }, - markDocumentUneditted:{ + markUnedited:{ value: function() { this.dirtyFlag = false; } 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, { el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); } if(!noEvent) { - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); NJevent("elementAdded", el); } } @@ -130,7 +130,7 @@ exports.ElementMediator = Montage.create(NJComponent, { _removeElement: { value: function(el, rules) { ElementController.removeElement(el, rules); - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); NJevent("elementDeleted", el); } }, @@ -189,7 +189,7 @@ exports.ElementMediator = Montage.create(NJComponent, { NJUtils.makeElementModel(el, "Canvas", "block", true); } - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); return el.elementModel.controller["setShapeProperty"](el, prop, value); } @@ -258,7 +258,7 @@ exports.ElementMediator = Montage.create(NJComponent, { item.elementModel.controller["setAttribute"](item, att, value); - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); NJevent("attribute" + eventType, {type : "setAttribute", source: source, data: {"els": el, "prop": att, "value": value}, redraw: null}); } @@ -332,7 +332,7 @@ exports.ElementMediator = Montage.create(NJComponent, { el.elementModel.controller["setProperty"](el, p, value[i]); } - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); NJevent("element" + eventType, {type : "setProperty", source: source, data: {"els": els, "prop": p, "value": value}, redraw: null}); } @@ -393,7 +393,7 @@ exports.ElementMediator = Montage.create(NJComponent, { el.elementModel.controller["setProperties"](el, props, i); } - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); NJevent("element" + eventType, {type : "setProperties", source: source, data: {"els": els, "prop": props, "value": props}, redraw: null}); } @@ -467,7 +467,7 @@ exports.ElementMediator = Montage.create(NJComponent, { el.elementModel.controller["set3DProperties"](el, props, i, update3DModel); } - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); NJevent("element" + eventType, {type : "set3DProperties", source: source, data: {"els": els, "prop": "matrix", "value": props}, redraw: null}); } @@ -553,7 +553,7 @@ exports.ElementMediator = Montage.create(NJComponent, { el.elementModel.controller["setColor"](el, value, isFill); } - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); NJevent("element" + eventType, {type : "setColor", source: source, data: {"els": els, "prop": "color", "value": value, "isFill": isFill}, redraw: null}); } @@ -636,7 +636,7 @@ exports.ElementMediator = Montage.create(NJComponent, { el.elementModel.controller["setStroke"](el, value); } - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); NJevent("element" + eventType, {type : "setStroke", source: source, data: {"els": els, "prop": "stroke", "value": value}, redraw: null}); } @@ -712,7 +712,7 @@ exports.ElementMediator = Montage.create(NJComponent, { } else { - this.application.ninja.documentController.activeDocument.markDocumentEditted(); + this.application.ninja.documentController.activeDocument.markEdited(); NJevent("elementChange", {type : "setMatrix", source: null, data: {"els": [el], "prop": "matrix", "value": mat}, redraw: null}); } 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, { onChange: function(){ var historySize = doc.editor.historySize(); if(historySize.undo>0){ - doc.markDocumentEditted(); + doc.markEdited(); }else if(historySize.undo===0 && historySize.redo>0){ - doc.markDocumentUneditted(); + doc.markUnedited(); } }, onCursorActivity: function() { -- cgit v1.2.3