From 01211be8e96360dcccdc421e5cb19c7708f5dfdd Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Wed, 28 Mar 2012 14:37:49 -0700 Subject: Bug #1073: Panels interact with hottest drag drop Signed-off-by: Armen Kesablyan --- js/panels/drag-drop-composer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/panels/drag-drop-composer.js b/js/panels/drag-drop-composer.js index b36c8334..4791bd6d 100644 --- a/js/panels/drag-drop-composer.js +++ b/js/panels/drag-drop-composer.js @@ -91,7 +91,9 @@ exports.DragDropComposer = Montage.create(Composer, { e.stopImmediatePropagation(); if (!this._dragover) { this._dragover = true; - this.component.element.classList.add("dragOver"); + if (this.component.application.ninja.componentBeingDragged) { + this.component.element.classList.add("dragOver"); + } } } }, -- cgit v1.2.3 From bff711520b7d21cfffe07c7a14fe8870243ba796 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Thu, 29 Mar 2012 14:06:22 -0700 Subject: Resizing Bugs Signed-off-by: Armen Kesablyan --- css/ninja.css | 2 +- js/ninja.reel/ninja.js | 53 +++++++++++++++++++------------------- js/panels/Splitter.js | 13 ++++++++-- scss/imports/scss/_MainWindow.scss | 2 +- 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/css/ninja.css b/css/ninja.css index 605951e4..c4015a21 100755 --- a/css/ninja.css +++ b/css/ninja.css @@ -80,7 +80,7 @@ body { position: absolute; margin: 0px; width: 100%; height: 100%; background-co #topPanelContainer { overflow: hidden; margin-bottom: 2px; height: 32px; } -.timelinePanel { background: transparent; height: 150px; min-height: 46px; max-height: 50%; overflow: auto; } +.timelinePanel { background: transparent; height: 150px; min-height: 46px; max-height: 50%; overflow: auto; -webkit-transition: all 0.15s linear; } .panelContainer { display: -webkit-box; -webkit-box-orient: vertical; position: relative; } diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index ca094936..c3e00911 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -24,7 +24,7 @@ exports.Ninja = Montage.create(Component, { }, _isResizing: { - value: false + value: null }, _resizedHeight : { value: 0 @@ -40,7 +40,6 @@ exports.Ninja = Montage.create(Component, { set: function(val) { if(this._height != val) { this._height = val; - this.needsDraw = true; } } @@ -60,7 +59,6 @@ exports.Ninja = Montage.create(Component, { set: function(val) { if(this._width != val) { this._width = val; - this.needsDraw = true; } } @@ -71,6 +69,8 @@ exports.Ninja = Montage.create(Component, { this.isResizing = true; this.height = parseInt(this.timeline.element.offsetHeight); this.width = parseInt(this.rightPanelContainer.offsetWidth); + this.rightPanelContainer.classList.add("disableTransition"); + this.timeline.element.classList.add("disableTransition"); this.needsDraw = true; } }, @@ -79,7 +79,6 @@ exports.Ninja = Montage.create(Component, { value:function(e) { this._resizedHeight = e._event.dY; this._resizedWidth = e._event.dX; - console.log("resizing"); this.stage.resizeCanvases = true; this.needsDraw = true; } @@ -87,13 +86,17 @@ exports.Ninja = Montage.create(Component, { handleResizeEnd: { value: function(e) { - this.height -= this._resizedHeight; - this.width -= this._resizedWidth; +// this.height -= this._resizedHeight; +// this.width -= this._resizedWidth; this.stage.resizeCanvases = true; this._resizedHeight = 0; this._resizedWidth = 0; this.isResizing = false; this.needsDraw = true; + this.rightPanelContainer.classList.remove("disableTransition"); + this.timeline.element.classList.remove("disableTransition"); + this.height = this.timeline.element.offsetHeight; + this.width = this.rightPanelContainer.offsetWidth; } }, @@ -106,6 +109,7 @@ exports.Ninja = Montage.create(Component, { this.needsDraw = true; this.timelineSplitter.collapsed = false; this.panelSplitter.collapsed = false; + this.stage.resizeCanvases = true; } }, @@ -167,30 +171,28 @@ exports.Ninja = Montage.create(Component, { willDraw: { value: function() { - if (this.height === null) { - this.height = parseInt(this.timeline.element.offsetHeight); - } - if (this.width === null) { - this.width = parseInt(this.rightPanelContainer.offsetWidth); - } + } }, draw: { value: function() { - if (this.height - this._resizedHeight < 46) { - this.timelineSplitter.collapsed = true; - } else { - this.timelineSplitter.collapsed = false; - } - if (this.width - this._resizedWidth < 30) { - this.panelSplitter.collapsed = true; - } else { - this.panelSplitter.collapsed = false; + if(this.isResizing) { + if (this.height - this._resizedHeight < 46) { + this.timelineSplitter.collapsed = true; + } else { + this.timelineSplitter.collapsed = false; + } + this.timeline.element.style.height = (this.height - this._resizedHeight) + "px"; + + if (this.width - this._resizedWidth < 30) { + this.panelSplitter.collapsed = true; + } else { + this.panelSplitter.collapsed = false; + } + this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px"; } - this.timeline.element.style.height = (this.height - this._resizedHeight) + "px"; - this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px"; } }, @@ -200,10 +202,7 @@ exports.Ninja = Montage.create(Component, { didDraw: { value: function() { - if (!this.isResizing) { - this.height = this.timeline.element.offsetHeight; - this.width = this.rightPanelContainer.offsetWidth; - } + if(!this._didDraw) { if (!this.application.ninja.coreIoApi.ioServiceDetected) { var check = this.application.ninja.coreIoApi.cloudAvailable(); diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index 6791e0d5..ac45b4ba 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js @@ -94,7 +94,11 @@ exports.Splitter = Montage.create(Component, { handleClick : { value: function() { if (!this.disabled) { - this.panel.addEventListener("webkitTransitionEnd", this, false); + if(this.panel.element) { + this.panel.element.addEventListener("webkitTransitionEnd", this, false); + } else { + this.panel.addEventListener("webkitTransitionEnd", this, false); + } this.collapsed = !this.collapsed; this.needsDraw = true; } @@ -103,7 +107,12 @@ exports.Splitter = Montage.create(Component, { handleWebkitTransitionEnd: { value: function() { - this.panel.removeEventListener("webkitTransitionEnd", this, false); + if(this.panel.element) { + this.panel.element.removeEventListener("webkitTransitionEnd", this, false); + } else { + this.panel.removeEventListener("webkitTransitionEnd", this, false); + } + this.application.ninja.stage.resizeCanvases = true; } }, diff --git a/scss/imports/scss/_MainWindow.scss b/scss/imports/scss/_MainWindow.scss index ba9851da..f6068ddb 100755 --- a/scss/imports/scss/_MainWindow.scss +++ b/scss/imports/scss/_MainWindow.scss @@ -89,7 +89,7 @@ min-height:46px; max-height:50%; overflow:auto; - + -webkit-transition: all 0.15s linear; } .panelContainer { -- cgit v1.2.3 From e6299d0965d669cd296de1b2ffc1b30734ead43b Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Thu, 29 Mar 2012 15:58:36 -0700 Subject: Bug Fix: Height and width of panels not be kept Signed-off-by: Armen Kesablyan --- js/ninja.reel/ninja.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index c3e00911..068a44bc 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -35,11 +35,19 @@ exports.Ninja = Montage.create(Component, { height: { get: function() { + if(this._height === null) { + var storedData = this.application.localStorage.getItem("timelinePanel"); + if(storedData && storedData.value) { + this._height = storedData.value; + } + } return this._height; }, set: function(val) { if(this._height != val) { this._height = val; + this.application.localStorage.setItem("timelinePanel", {"version": this.version, "value": val}); + this.needsDraw = true; } } @@ -54,11 +62,19 @@ exports.Ninja = Montage.create(Component, { width: { get: function() { + if(this._width === null) { + var storedData = this.application.localStorage.getItem("rightPanelsContainer"); + if(storedData && storedData.value) { + this._width = storedData.value; + } + } return this._width; }, set: function(val) { if(this._width != val) { this._width = val; + this.application.localStorage.setItem("rightPanelsContainer", {"version": this.version, "value": val}); + this.needsDraw = true; } } @@ -106,10 +122,10 @@ exports.Ninja = Montage.create(Component, { this.height = 140; this._resizedHeight = 0; this._resizedWidth = 0; - this.needsDraw = true; this.timelineSplitter.collapsed = false; this.panelSplitter.collapsed = false; this.stage.resizeCanvases = true; + this.needsDraw = true; } }, @@ -183,16 +199,16 @@ exports.Ninja = Montage.create(Component, { } else { this.timelineSplitter.collapsed = false; } - this.timeline.element.style.height = (this.height - this._resizedHeight) + "px"; if (this.width - this._resizedWidth < 30) { this.panelSplitter.collapsed = true; } else { this.panelSplitter.collapsed = false; } - this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px"; - } + } + this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px"; + this.timeline.element.style.height = (this.height - this._resizedHeight) + "px"; } }, -- cgit v1.2.3 From 5a5d0f68dd82b829405a0b301dd11b4cf385c8d5 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Fri, 30 Mar 2012 13:25:20 -0700 Subject: Bug #1060: Fixed CSS Lint issue Signed-off-by: Armen Kesablyan --- css/ninja.css | 2 +- scss/imports/scss/_PanelUI.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/css/ninja.css b/css/ninja.css index c4015a21..650f3b08 100755 --- a/css/ninja.css +++ b/css/ninja.css @@ -604,7 +604,7 @@ button.panel-button { -webkit-appearance: none; font-size: 9px; color: white; ba .pp_strokelabel { border: none; margin: -1px 8px 0px 27px; } -.pp_filllabel { border-width: none; margin: -1px 8px 0px 34px; } +.pp_filllabel { border: none; margin: -1px 8px 0px 34px; } .panels { display: -webkit-box; position: absolute; -webkit-box-orient: vertical; -webkit-box-align: stretch; height: 100%; width: 100%; overflow: hidden; } diff --git a/scss/imports/scss/_PanelUI.scss b/scss/imports/scss/_PanelUI.scss index f76d3e20..d60dae59 100755 --- a/scss/imports/scss/_PanelUI.scss +++ b/scss/imports/scss/_PanelUI.scss @@ -1088,7 +1088,7 @@ button.panel-button { margin: -1px 8px 0px 27px; } .pp_filllabel{ - border-width: none; + border: none; margin: -1px 8px 0px 34px; } // End Styles for DivPIProperties -- cgit v1.2.3