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