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') 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