From 48bb94a72126e7be712b2c4ca9be2f03ecb65aea Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 25 Jun 2012 14:54:16 -0700 Subject: IKNinja-1688 - Creating a banner file after a code file causes body div to shift to the right and has different scroll bars. Signed-off-by: Nivesh Rajbhandari --- js/panels/Splitter.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'js/panels/Splitter.js') diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index c6d46911..4f2a137e 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -156,7 +156,7 @@ exports.Splitter = Montage.create(Component, { } }, restore:{ - value: function() { + value: function(onSwitchFromCodeDocument) { //Get splitter initial value from SettingManager var storedData = this.application.localStorage.getItem(this.element.getAttribute("data-montage-id")), temp = this.collapsed; if(storedData && this.element.getAttribute("data-montage-id") !== null) { @@ -172,7 +172,11 @@ exports.Splitter = Montage.create(Component, { this.panel.addEventListener("webkitTransitionEnd", this, false); } this.disabled = false; - this.needsDraw = true; + if(onSwitchFromCodeDocument) { + this.draw(); // When switching from code document, draw immediately so stage size is correct + } else { + this.needsDraw = true; + } } } } -- cgit v1.2.3