From 27935436ad8cd0675311667f70b6a285eb126a94 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 4 May 2012 17:10:01 -0700 Subject: Fixing references to iframe's styles in new template. Signed-off-by: Nivesh Rajbhandari --- js/ninja.reel/ninja.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index cf7c6cf4..edc1efa4 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -300,7 +300,7 @@ exports.Ninja = Montage.create(Component, { // Turn on WebGL animation during preview _toggleWebGlAnimation: { value: function(inLivePreview) { - var glCanvases = this.currentDocument.iframe.contentWindow.document.querySelectorAll('[data-RDGE-id]'), + var glCanvases = this.currentDocument.model.views.design.iframe.contentWindow.document.querySelectorAll('[data-RDGE-id]'), glShapeModel; if(glCanvases) { for(var i = 0, len = glCanvases.length; i --- js/ninja.reel/ninja.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 4d7d883d..f518378a 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -284,19 +284,23 @@ exports.Ninja = Montage.create(Component, { var background, overflow, transitionStopRule; this.stage.hideCanvas(this.appModel.livePreview); + // TODO: Remove marker for old template: NINJA-STAGE-REWORK if(this.appModel.livePreview) { - background = "#000000"; - overflow = "hidden"; +// background = "#000000"; +// overflow = "hidden"; transitionStopRule = "nj-css-garbage-selector"; } else { - background = "#808080"; - overflow = "visible"; +// background = "#808080"; +// overflow = "visible"; transitionStopRule = "*" } - this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "body-background", background); - this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "overflow", overflow); - this.currentDocument.documentRoot.elementModel.controller.changeSelector(this.currentDocument.documentRoot, "transitionStopRule", transitionStopRule); + // TODO: Remove marker for old template: NINJA-STAGE-REWORK +// this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "body-background", background); +// this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "overflow", overflow); +// this.currentDocument.documentRoot.elementModel.controller.changeSelector(this.currentDocument.documentRoot, "transitionStopRule", transitionStopRule); + + this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule; this._toggleWebGlAnimation(this.appModel.livePreview); } -- cgit v1.2.3 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/ninja.reel/ninja.js | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index f518378a..3fcce925 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -346,31 +346,6 @@ exports.Ninja = Montage.create(Component, { } }, - _handleAppLoaded: { - value: function(event){ - - /* - Object.defineBinding(docBar, "type", { - boundObject: DocumentManagerModule.DocumentManager, - boundObjectPropertyPath: "activeDocument.documentType" - }); - - Object.defineBinding(docBar, "currentView", { - boundObject: DocumentManagerModule.DocumentManager, - boundObjectPropertyPath: "activeDocument.currentView", - oneway: false - }); - - Object.defineBinding(docBar, "zoomFactor", { - boundObject: DocumentManagerModule.DocumentManager, - boundObjectPropertyPath: "activeDocument.zoomFactor", - oneway: false - }); - */ - - } - }, - setupGlobalHelpers: { value: function() { -- cgit v1.2.3 From 0ebb822b0535bf1bb100b3f3cb396c8b6d3383f1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 11:23:12 -0700 Subject: fixing some of the document bindings. Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 52a6daa2..51d74cb2 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -186,6 +186,9 @@ "properties": { "element": {"#": "stageAndScenesContainer"}, "appModel": {"@": "appModel"} + }, + "bindings": { + "activeDocument": {"<-": "@documentController1.activeDocument"} } }, @@ -263,11 +266,7 @@ "selectionController1": { "prototype": "js/controllers/selection-controller", "bindings" : { - "selectionContainer": { - "boundObject": {"@": "owner"}, - "boundObjectPropertyPath": "currentSelectedContainer", - "oneway": true - } + "selectionContainer": {"<-": "@owner.currentSelectedContainer"} } }, @@ -287,7 +286,10 @@ }, "stylesController": { - "prototype": "js/controllers/styles-controller" + "prototype": "js/controllers/styles-controller", + "bindings": { + "activeDocument": {"<-": "@documentController1.activeDocument"} + } }, "presetsController": { -- cgit v1.2.3 From fd54dabad7cbc27a0efb0957155c00d578912909 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 15:32:36 -0700 Subject: changing @change to propertyChangeListener Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 3fcce925..87167d4c 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -165,9 +165,9 @@ exports.Ninja = Montage.create(Component, { this.eventManager.addEventListener( "selectSubTool", this, false); this.eventManager.addEventListener( "onOpenDocument", this, false); - this.addEventListener("change@appModel.livePreview", this.executeLivePreview, false); - this.addEventListener("change@appModel.chromePreview", this.executeChromePreview, false); - this.addEventListener("change@appModel.debug", this.toggleDebug, false); + this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false); + this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false); + this.addPropertyChangeListener("appModel.debug", this.toggleDebug, false); NJevent("appLoading"); } -- cgit v1.2.3