From c5204cc96a08413d48bd8148034189b6f710ade9 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 28 Jun 2012 16:24:24 -0700 Subject: Changing the livePreview button to do a chromePreview and keeping the canvas when doing a timeline play Signed-off-by: Valerio Virgillito --- js/components/layout/stage-mode.reel/stage-mode.js | 12 ++++++------ js/ninja.reel/ninja.html | 2 +- js/ninja.reel/ninja.js | 14 ++------------ 3 files changed, 9 insertions(+), 19 deletions(-) (limited to 'js') diff --git a/js/components/layout/stage-mode.reel/stage-mode.js b/js/components/layout/stage-mode.reel/stage-mode.js index cb42276b..b772d688 100755 --- a/js/components/layout/stage-mode.reel/stage-mode.js +++ b/js/components/layout/stage-mode.reel/stage-mode.js @@ -9,17 +9,17 @@ var Montage = require("montage/core/core").Montage, exports.StageMode = Montage.create(Component, { - _livePreview: { + _chromePreview: { value: null }, - livePreview: { + chromePreview: { get: function() { - return this._livePreview; + return this._chromePreview; }, set: function(value) { - if(value !== this._livePreview) { - this._livePreview = value; + if(value !== this._chromePreview) { + this._chromePreview = value; this.needsDraw = true; } } @@ -46,7 +46,7 @@ exports.StageMode = Montage.create(Component, { handleClick: { value: function(event) { - this.livePreview = !this.livePreview; + this.chromePreview = !this.chromePreview; } } }); \ No newline at end of file diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 5429e7d0..1ebf8413 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -163,7 +163,7 @@ "element": {"#": "stageMode"} }, "bindings" : { - "livePreview": {"<->": "@appModel.livePreview"} + "chromePreview": {"<->": "@appModel.chromePreview"} } }, diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 859268a0..e325316b 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -511,25 +511,15 @@ exports.Ninja = Montage.create(Component, { executeLivePreview: { value: function() { - var background, overflow, transitionStopRule; - this.stage.hideCanvas(this.appModel.livePreview); + var transitionStopRule; +// this.stage.hideCanvas(this.appModel.livePreview); - // TODO: Remove marker for old template: NINJA-STAGE-REWORK if(this.appModel.livePreview) { -// background = "#000000"; -// overflow = "hidden"; transitionStopRule = "nj-css-garbage-selector"; } else { -// background = "#808080"; -// overflow = "visible"; transitionStopRule = "*" } - // TODO: Remove marker for old template: NINJA-STAGE-REWORK -// this.currentDocument.model.documentRoot.elementModel.controller.setProperty(this.currentDocument.model.documentRoot, "body-background", background); -// this.currentDocument.model.documentRoot.elementModel.controller.setProperty(this.currentDocument.model.documentRoot, "overflow", overflow); -// this.currentDocument.model.documentRoot.elementModel.controller.changeSelector(this.currentDocument.model.documentRoot, "transitionStopRule", transitionStopRule); - this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule; this._toggleWebGlAnimation(this.appModel.livePreview); -- cgit v1.2.3