aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel/ninja.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-05-15 16:34:46 -0700
committerArmen Kesablyan2012-05-15 16:34:46 -0700
commitc8d61c8e72e0eba266575f9df54325fa77fde73d (patch)
tree556cafd76ab9b2cf4cc2b4cc3ea17b12ce690b69 /js/ninja.reel/ninja.js
parent15a3aaebb56cb2c9409bfe55c862868726c7fd44 (diff)
parent46bd3712329cd3c9311e50ed9ee4c2245bd1be5a (diff)
downloadninja-c8d61c8e72e0eba266575f9df54325fa77fde73d.tar.gz
Merge branch 'dom-architecture' of github.com:Motorola-Mobility/ninja-internal into binding
Diffstat (limited to 'js/ninja.reel/ninja.js')
-rwxr-xr-xjs/ninja.reel/ninja.js52
1 files changed, 18 insertions, 34 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 75b2203e..537d7eb0 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -193,12 +193,17 @@ exports.Ninja = Montage.create(Component, {
193 } 193 }
194 }, 194 },
195 195
196
197 ////////////////////////////////////////////////////////////////////
198 //TODO: Expand method to allow other browsers for preview
196 executeChromePreview: { 199 executeChromePreview: {
197 value: function () { 200 value: function () {
198 this.application.ninja.documentController.activeDocument.livePreview(); 201 this.application.ninja.documentController.activeDocument.model.browserPreview('chrome');
199 } 202 }
200 }, 203 },
201 204 ////////////////////////////////////////////////////////////////////
205
206
202 handleResize: { 207 handleResize: {
203 value: function() { 208 value: function() {
204 this.stage.resizeCanvases = true; 209 this.stage.resizeCanvases = true;
@@ -299,19 +304,23 @@ exports.Ninja = Montage.create(Component, {
299 var background, overflow, transitionStopRule; 304 var background, overflow, transitionStopRule;
300 this.stage.hideCanvas(this.appModel.livePreview); 305 this.stage.hideCanvas(this.appModel.livePreview);
301 306
307 // TODO: Remove marker for old template: NINJA-STAGE-REWORK
302 if(this.appModel.livePreview) { 308 if(this.appModel.livePreview) {
303 background = "#000000"; 309// background = "#000000";
304 overflow = "hidden"; 310// overflow = "hidden";
305 transitionStopRule = "nj-css-garbage-selector"; 311 transitionStopRule = "nj-css-garbage-selector";
306 } else { 312 } else {
307 background = "#808080"; 313// background = "#808080";
308 overflow = "visible"; 314// overflow = "visible";
309 transitionStopRule = "*" 315 transitionStopRule = "*"
310 } 316 }
311 317
312 this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "body-background", background); 318 // TODO: Remove marker for old template: NINJA-STAGE-REWORK
313 this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "overflow", overflow); 319// this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "body-background", background);
314 this.currentDocument.documentRoot.elementModel.controller.changeSelector(this.currentDocument.documentRoot, "transitionStopRule", transitionStopRule); 320// this.currentDocument.documentRoot.elementModel.controller.setProperty(this.currentDocument.documentRoot, "overflow", overflow);
321// this.currentDocument.documentRoot.elementModel.controller.changeSelector(this.currentDocument.documentRoot, "transitionStopRule", transitionStopRule);
322
323 this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule;
315 324
316 this._toggleWebGlAnimation(this.appModel.livePreview); 325 this._toggleWebGlAnimation(this.appModel.livePreview);
317 } 326 }
@@ -357,31 +366,6 @@ exports.Ninja = Montage.create(Component, {
357 } 366 }
358 }, 367 },
359 368
360 _handleAppLoaded: {
361 value: function(event){
362
363 /*
364 Object.defineBinding(docBar, "type", {
365 boundObject: DocumentManagerModule.DocumentManager,
366 boundObjectPropertyPath: "activeDocument.documentType"
367 });
368
369 Object.defineBinding(docBar, "currentView", {
370 boundObject: DocumentManagerModule.DocumentManager,
371 boundObjectPropertyPath: "activeDocument.currentView",
372 oneway: false
373 });
374
375 Object.defineBinding(docBar, "zoomFactor", {
376 boundObject: DocumentManagerModule.DocumentManager,
377 boundObjectPropertyPath: "activeDocument.zoomFactor",
378 oneway: false
379 });
380 */
381
382 }
383 },
384
385 setupGlobalHelpers: { 369 setupGlobalHelpers: {
386 value: function() { 370 value: function() {
387 371