From ee54342b5f4fdd41c46543d6402e649e4b3d57cb Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 22 May 2012 17:58:23 -0700 Subject: - don't redraw stage for code document - fixes a switching bug - fix for ctrl+S for code document - disallow opening the panels while in code document Signed-off-by: Ananya Sen --- js/panels/Splitter.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index 0640abb2..8675d314 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -111,8 +111,9 @@ exports.Splitter = Montage.create(Component, { } else { this.panel.removeEventListener("webkitTransitionEnd", this, false); } - - this.application.ninja.stage.resizeCanvases = true; + if(this.application.ninja.currentDocument.currentView === "design"){ + this.application.ninja.stage.resizeCanvases = true; + } } }, @@ -149,6 +150,7 @@ exports.Splitter = Montage.create(Component, { this.panel.addEventListener("webkitTransitionEnd", this, false); } this._collapsed = true; + this.disabled = true; this.needsDraw = true; } } @@ -169,6 +171,7 @@ exports.Splitter = Montage.create(Component, { } else { this.panel.addEventListener("webkitTransitionEnd", this, false); } + this.disabled = false; this.needsDraw = true; } } -- cgit v1.2.3 From f1dbf7c58e91a27c80f3a607e87ad122d803c500 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 23 May 2012 13:29:13 -0700 Subject: Timeline triggerBinding needs to be set to false in the track data. Signed-off-by: Nivesh Rajbhandari --- js/panels/Timeline/Layer.reel/Layer.js | 6 +----- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 9 +++------ js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 6 +----- 3 files changed, 5 insertions(+), 16 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 6358a0e0..e8619d02 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -498,11 +498,7 @@ var Layer = exports.Layer = Montage.create(Component, { triggerOutgoingBinding : { value: function() { - if (this.layerData.triggerBinding === true) { - this.layerData.triggerBinding = false; - } else { - this.layerData.triggerBinding = true; - } + this.layerData.triggerBinding = !this.layerData.triggerBinding; } }, /* END: Models */ diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index c382c9a7..80133edf 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -437,6 +437,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { returnObj.layerData.isVisible = true; returnObj.layerData.docUUID = this.application.ninja.currentDocument._uuid; returnObj.layerData.isTrackAnimated = false; + returnObj.layerData.triggerBinding = false; returnObj.parentElementUUID = null; returnObj.parentElement = null; @@ -1402,12 +1403,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Trigger the layer/track data binding triggerLayerBinding : { value: function(intIndex) { - if (this.arrLayers[intIndex].layerData.triggerBinding === true) { - this.arrLayers[intIndex].layerData.triggerBinding = false; - } else { - this.arrLayers[intIndex].layerData.triggerBinding = true; - } - } + this.arrLayers[intIndex].layerData.triggerBinding = !this.arrLayers[intIndex].layerData.triggerBinding; + } }, handleLayerDragStart : { diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 2c15a99c..3d83dc36 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -405,11 +405,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { triggerOutgoingBinding : { value: function() { - if (this.trackData.triggerBinding === true) { - this.trackData.triggerBinding = false; - } else { - this.trackData.triggerBinding = true; - } + this.trackData.triggerBinding = !this.trackData.triggerBinding; } }, -- cgit v1.2.3 From 26d4cbf0f5c65f60051273f1648a0e8005d8c78a Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 23 May 2012 13:40:56 -0700 Subject: - removed redundant change - fixed js error on click of splitters when no documents are open Signed-off-by: Ananya Sen --- js/panels/Splitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index 8675d314..f0fb1a45 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -111,7 +111,7 @@ exports.Splitter = Montage.create(Component, { } else { this.panel.removeEventListener("webkitTransitionEnd", this, false); } - if(this.application.ninja.currentDocument.currentView === "design"){ + if(this.application.ninja.currentDocument && this.application.ninja.currentDocument.currentView === "design"){ this.application.ninja.stage.resizeCanvases = true; } } -- cgit v1.2.3 From 0ca1910df1c78116139664bf39a95cf0ec7c8dc8 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 23 May 2012 15:35:15 -0700 Subject: adding document views checks for the timeline and breadcrumb Signed-off-by: Valerio Virgillito --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 80133edf..2c02e544 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -596,7 +596,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // That's all we need to do for a brand new file. // But what if we're opening an existing document? - if (!this.application.ninja.documentController.creatingNewFile) { + if (!this.application.ninja.documentController.creatingNewFile && this.application.ninja.currentDocument.currentView !== "code") { // Opening an existing document. If it has DOM elements we need to restore their timeline info if (this.application.ninja.currentDocument.documentRoot.children[0]) { // Yes, it has DOM elements. Loop through them and create a new object for each. -- cgit v1.2.3