diff options
author | Valerio Virgillito | 2012-06-28 16:24:24 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-28 16:27:54 -0700 |
commit | c5204cc96a08413d48bd8148034189b6f710ade9 (patch) | |
tree | 8f173f71aed2176b81cb3e9ece9f85561287c712 | |
parent | 3ba9accb8e1887bfd6f1f912b6135073a3d9c70c (diff) | |
download | ninja-c5204cc96a08413d48bd8148034189b6f710ade9.tar.gz |
Changing the livePreview button to do a chromePreview and keeping the canvas when doing a timeline play
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
-rwxr-xr-x | js/components/layout/stage-mode.reel/stage-mode.js | 12 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.html | 2 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 14 |
3 files changed, 9 insertions, 19 deletions
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, | |||
9 | 9 | ||
10 | exports.StageMode = Montage.create(Component, { | 10 | exports.StageMode = Montage.create(Component, { |
11 | 11 | ||
12 | _livePreview: { | 12 | _chromePreview: { |
13 | value: null | 13 | value: null |
14 | }, | 14 | }, |
15 | 15 | ||
16 | livePreview: { | 16 | chromePreview: { |
17 | get: function() { | 17 | get: function() { |
18 | return this._livePreview; | 18 | return this._chromePreview; |
19 | }, | 19 | }, |
20 | set: function(value) { | 20 | set: function(value) { |
21 | if(value !== this._livePreview) { | 21 | if(value !== this._chromePreview) { |
22 | this._livePreview = value; | 22 | this._chromePreview = value; |
23 | this.needsDraw = true; | 23 | this.needsDraw = true; |
24 | } | 24 | } |
25 | } | 25 | } |
@@ -46,7 +46,7 @@ exports.StageMode = Montage.create(Component, { | |||
46 | 46 | ||
47 | handleClick: { | 47 | handleClick: { |
48 | value: function(event) { | 48 | value: function(event) { |
49 | this.livePreview = !this.livePreview; | 49 | this.chromePreview = !this.chromePreview; |
50 | } | 50 | } |
51 | } | 51 | } |
52 | }); \ No newline at end of file | 52 | }); \ 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 @@ | |||
163 | "element": {"#": "stageMode"} | 163 | "element": {"#": "stageMode"} |
164 | }, | 164 | }, |
165 | "bindings" : { | 165 | "bindings" : { |
166 | "livePreview": {"<->": "@appModel.livePreview"} | 166 | "chromePreview": {"<->": "@appModel.chromePreview"} |
167 | } | 167 | } |
168 | }, | 168 | }, |
169 | 169 | ||
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, { | |||
511 | 511 | ||
512 | executeLivePreview: { | 512 | executeLivePreview: { |
513 | value: function() { | 513 | value: function() { |
514 | var background, overflow, transitionStopRule; | 514 | var transitionStopRule; |
515 | this.stage.hideCanvas(this.appModel.livePreview); | 515 | // this.stage.hideCanvas(this.appModel.livePreview); |
516 | 516 | ||
517 | // TODO: Remove marker for old template: NINJA-STAGE-REWORK | ||
518 | if(this.appModel.livePreview) { | 517 | if(this.appModel.livePreview) { |
519 | // background = "#000000"; | ||
520 | // overflow = "hidden"; | ||
521 | transitionStopRule = "nj-css-garbage-selector"; | 518 | transitionStopRule = "nj-css-garbage-selector"; |
522 | } else { | 519 | } else { |
523 | // background = "#808080"; | ||
524 | // overflow = "visible"; | ||
525 | transitionStopRule = "*" | 520 | transitionStopRule = "*" |
526 | } | 521 | } |
527 | 522 | ||
528 | // TODO: Remove marker for old template: NINJA-STAGE-REWORK | ||
529 | // this.currentDocument.model.documentRoot.elementModel.controller.setProperty(this.currentDocument.model.documentRoot, "body-background", background); | ||
530 | // this.currentDocument.model.documentRoot.elementModel.controller.setProperty(this.currentDocument.model.documentRoot, "overflow", overflow); | ||
531 | // this.currentDocument.model.documentRoot.elementModel.controller.changeSelector(this.currentDocument.model.documentRoot, "transitionStopRule", transitionStopRule); | ||
532 | |||
533 | this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule; | 523 | this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule; |
534 | 524 | ||
535 | this._toggleWebGlAnimation(this.appModel.livePreview); | 525 | this._toggleWebGlAnimation(this.appModel.livePreview); |