From f6f722feecf88c8afe59327eaf8557ce4012abc7 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 10 May 2012 22:40:02 -0700 Subject: Fixing the dirty document flag. Disabling the stylesheets dirty flag because === true on document open. Signed-off-by: Valerio Virgillito --- js/mediators/element-mediator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/mediators/element-mediator.js') diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 06514076..483dacbc 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js @@ -48,7 +48,7 @@ exports.ElementMediator = Montage.create(Component, { document.application.undoManager.add(undoLabel, this.removeElements, this, elements, notify); - this.application.ninja.documentController.activeDocument.needsSave = true; + this.application.ninja.documentController.activeDocument.model.needsSave = true; if(notify || notify === undefined) { NJevent("elementAdded", elements); @@ -77,7 +77,7 @@ exports.ElementMediator = Montage.create(Component, { document.application.undoManager.add(undoLabel, this.addElements, this, elements, null, notify); - this.application.ninja.documentController.activeDocument.needsSave = true; + this.application.ninja.documentController.activeDocument.model.needsSave = true; NJevent("elementsRemoved", elements); } @@ -92,7 +92,7 @@ exports.ElementMediator = Montage.create(Component, { document.application.undoManager.add(undoLabel, this.replaceElement, this, oldChild, newChild); - this.application.ninja.documentController.activeDocument.needsSave = true; + this.application.ninja.documentController.activeDocument.model.needsSave = true; if(notify || notify === undefined) { NJevent("elementReplaced", {type : "replaceElement", data: {"newChild": newChild, "oldChild": oldChild}}); -- cgit v1.2.3 From 5914c5b2209c4b8daac4249bb76cda5c9314c4e6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 24 May 2012 00:07:23 -0700 Subject: Cleaning up referencing to 'documentRoot' and '_document' Moved to reference new model in DOM architecture rework. This should not affect anything, just moving the references, and also the setting to the render methods in the design view. --- js/mediators/element-mediator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/mediators/element-mediator.js') diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 483dacbc..f71a6f4d 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js @@ -86,7 +86,7 @@ exports.ElementMediator = Montage.create(Component, { replaceElement: { value: function(newChild, oldChild, notify) { - this.application.ninja.currentDocument.documentRoot.replaceChild(newChild, oldChild); + this.application.ninja.currentDocument.model.documentRoot.replaceChild(newChild, oldChild); var undoLabel = "replace element"; @@ -520,7 +520,7 @@ exports.ElementMediator = Montage.create(Component, { value: function(layersDraggedArray, layerDroppedAfter) { var documentRoot,length; - documentRoot = this.application.ninja.currentDocument.documentRoot; + documentRoot = this.application.ninja.currentDocument.model.documentRoot; length = layersDraggedArray.length; for(var i=0; documentRoot.children[i]; i++) { -- cgit v1.2.3