From 4504972c1f3b9bf1d02a4484a07a8a85cf9ccee2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 8 May 2012 10:37:38 -0700 Subject: Adding Chrome Preview --- js/ninja.reel/ninja.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js/ninja.reel/ninja.js') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index edc1efa4..4d7d883d 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -173,12 +173,17 @@ exports.Ninja = Montage.create(Component, { } }, + + //////////////////////////////////////////////////////////////////// + //TODO: Expand method to allow other browsers for preview executeChromePreview: { value: function () { - this.application.ninja.documentController.activeDocument.livePreview(); + this.application.ninja.documentController.activeDocument.model.browserPreview('chrome'); } }, - + //////////////////////////////////////////////////////////////////// + + handleResize: { value: function() { this.stage.resizeCanvases = true; -- cgit v1.2.3 From 6b65188b7a4a21ae1e575282fd5b6198b22ca7b7 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 10 May 2012 15:07:52 -0700 Subject: Fixing the live preview for the new document. Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'js/ninja.reel/ninja.js') 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/ninja.js') 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