From b9afa81d391f51ea199fc12278b89bdda883dd97 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 17 Jul 2012 23:34:57 -0700 Subject: removed left over comments. Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.html | 19 +++---------------- js/ninja.reel/ninja.js | 5 +++-- 2 files changed, 6 insertions(+), 18 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 17726712..4f40a3f8 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -52,10 +52,7 @@ POSSIBILITY OF SUCH DAMAGE. }, "appModel": { - "prototype": "js/models/app-model", - "bindings": { - "currentDocument": {"<-": "@documentList.selectedObjects.0"} - } + "prototype": "js/models/app-model" }, "materialsModel": { @@ -63,7 +60,7 @@ POSSIBILITY OF SUCH DAMAGE. }, "menu": { - "prototype": "js/components/menu/menu.reel", + "prototype": "js/ui/menu/menu.reel", "properties": { "element": {"#": "mainMenuBar"} }, @@ -183,17 +180,7 @@ POSSIBILITY OF SUCH DAMAGE. "currentDocument": {"<-": "@documentList.selectedObjects.0"} } }, - - "stageMode": { - "prototype": "js/components/layout/stage-mode.reel", - "properties": { - "element": {"#": "stageMode"} - }, - "bindings" : { - "chromePreview": {"<->": "@appModel.chromePreview"} - } - }, - + "toolsList": { "prototype": "js/components/layout/tools-list.reel", "properties": { diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 9fd71b1c..42d15d8b 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -351,6 +351,7 @@ exports.Ninja = Montage.create(Component, { this.ninjaVersion = window.ninjaVersion.ninja.version; this.undoManager = document.application.undoManager = UndoManager.create(); document.application.njUtils = NjUtils; + document.application.model = this.appModel; } }, @@ -376,9 +377,9 @@ exports.Ninja = Montage.create(Component, { this.eventManager.addEventListener("selectTool", this, false); this.eventManager.addEventListener("selectSubTool", this, false); + this.eventManager.addEventListener("executePreview", this, false); this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false); - this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false); this.addPropertyChangeListener("appModel.debug", this.toggleDebug, false); } }, @@ -387,7 +388,7 @@ exports.Ninja = Montage.create(Component, { //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //TODO: Expand method to allow other browsers for preview - executeChromePreview: { + handleExecutePreview: { value: function () { //TODO: Make into proper component this.saveOperationScreen = {}; -- cgit v1.2.3 From 6403ec6d21048c93138ddcbcc59fc4677121ed5e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 19 Jul 2012 15:53:54 -0700 Subject: Timeline: updated livePreview to timeline play. Hide canvas and draw red outline - Changed the play button to a toggle button - livePreview code in stage activated via bindings - Draw a red outline of the canvas when in play Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.html | 3 ++- js/ninja.reel/ninja.js | 47 +++++++++++------------------------------------ 2 files changed, 13 insertions(+), 37 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 4f40a3f8..fbbfd066 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -268,7 +268,8 @@ POSSIBILITY OF SUCH DAMAGE. "timeline": { "prototype": "js/panels/Timeline/TimelinePanel.reel", "properties": { - "element": {"#": "timelinePanelComponent"} + "element": {"#": "timelinePanelComponent"}, + "stage": {"@": "stage"} }, "bindings": { "currentDocument": {"<-": "@documentList.selectedObjects.0"} diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 42d15d8b..24e47612 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -379,7 +379,6 @@ exports.Ninja = Montage.create(Component, { this.eventManager.addEventListener("selectSubTool", this, false); this.eventManager.addEventListener("executePreview", this, false); - this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false); this.addPropertyChangeListener("appModel.debug", this.toggleDebug, false); } }, @@ -535,42 +534,18 @@ exports.Ninja = Montage.create(Component, { } }, - executeLivePreview: { - value: function() { - var transitionStopRule; -// this.stage.hideCanvas(this.appModel.livePreview); - - if(this.appModel.livePreview) { - transitionStopRule = "nj-css-garbage-selector"; - this.stage.bindingView.hide = true; - } else { - transitionStopRule = "*" - this.stage.bindingView.hide = false; - } - - this.application.ninja.stylesController._stageStylesheet.rules[0].selectorText = transitionStopRule; - - this._toggleWebGlAnimation(this.appModel.livePreview); - } - }, - - // Turn on WebGL animation during preview - _toggleWebGlAnimation: { - value: function(inLivePreview) { - var glCanvases = this.currentDocument.model.views.design.iframe.contentWindow.document.querySelectorAll('[data-RDGE-id]'), - glShapeModel; - if(glCanvases) { - for(var i = 0, len = glCanvases.length; i