From b4d3bf155e38e6554f05bb3cbaddd2f3bf799e90 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 13 Mar 2012 18:12:48 -0700 Subject: Fixing the layout to only draw one level and stage resize when the panels are collapsed. Fixing the following bugs: IKNINJA-1068 Signed-off-by: Valerio Virgillito --- js/panels/Splitter.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'js/panels/Splitter.js') diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index 3215e928..a396ea28 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -66,6 +66,7 @@ exports.Splitter = Montage.create(Component, { var storedData = this.application.localStorage.getItem(this.element.getAttribute("data-montage-id")); if(storedData && this.element.getAttribute("data-montage-id") !== null) { this._collapsed = storedData.value; + } else { this._collapsed = false; } @@ -77,13 +78,11 @@ exports.Splitter = Montage.create(Component, { draw: { value: function() { if(this.collapsed) { - if(this.panel.element) this.panel.element.classList.add("collapsed"); else this.panel.classList.add("collapsed"); this.element.classList.add("collapsed"); if(this._resizeBar != null) this.resizeBar.classList.add("collapsed"); - } - else { + } else { if(this.panel.element) this.panel.element.classList.remove("collapsed"); else this.panel.classList.remove("collapsed"); this.element.classList.remove("collapsed"); @@ -92,6 +91,12 @@ exports.Splitter = Montage.create(Component, { } }, + didDraw: { + value: function() { + this.application.ninja.stage.resizeCanvases = true; + } + }, + handleClick : { value: function() { if (!this.disabled) { -- cgit v1.2.3 From da5dfc8863ad47c48414ff1fdacbacdb91abd30c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 14 Mar 2012 23:25:34 -0700 Subject: Fixing the splitter resize canvas bug by getting the size when a document is opened. Signed-off-by: Valerio Virgillito --- js/panels/Splitter.js | 6 ------ 1 file changed, 6 deletions(-) (limited to 'js/panels/Splitter.js') diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index a396ea28..e92cb2dd 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -91,12 +91,6 @@ exports.Splitter = Montage.create(Component, { } }, - didDraw: { - value: function() { - this.application.ninja.stage.resizeCanvases = true; - } - }, - handleClick : { value: function() { if (!this.disabled) { -- cgit v1.2.3 From 49596f2a6b518ed0ee945006787d3c69e40a5757 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Thu, 22 Mar 2012 14:31:12 -0700 Subject: Updated Resizers for Panels and timeline Signed-off-by: Armen Kesablyan --- js/panels/Splitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/Splitter.js') diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index e92cb2dd..6791e0d5 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -55,7 +55,7 @@ exports.Splitter = Montage.create(Component, { }, set: function(value) { this._collapsed = value; - + this.needsDraw = true; this.application.localStorage.setItem(this.element.getAttribute("data-montage-id"), {"version": this.version, "value": value}); } }, -- cgit v1.2.3