diff options
author | Valerio Virgillito | 2012-07-19 11:56:08 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-19 11:56:08 -0700 |
commit | c97f806fceb2a2e3c668b965e4f8e6fc047a3d9a (patch) | |
tree | 8e8d87b31fffb7163aff0634ba4128f08be66343 /js/panels | |
parent | 6a49b632e0d7113ca7a6709e0a58097771512f20 (diff) | |
parent | fc13ef1e806116bb7ece5bb06604fa4f5714a6ed (diff) | |
download | ninja-c97f806fceb2a2e3c668b965e4f8e6fc047a3d9a.tar.gz |
Merge branch 'StageDrawingFixes' of https://github.com/mqg734/ninja into v0.7.1
Diffstat (limited to 'js/panels')
-rwxr-xr-x | js/panels/Materials/materials-library-panel.reel/materials-library-panel.js | 14 | ||||
-rwxr-xr-x | js/panels/Splitter.js | 2 | ||||
-rw-r--r-- | js/panels/css-panel/styles-view-delegate.js | 3 |
3 files changed, 17 insertions, 2 deletions
diff --git a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js index aef48230..4b9044ae 100755 --- a/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js +++ b/js/panels/Materials/materials-library-panel.reel/materials-library-panel.js | |||
@@ -116,6 +116,14 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { | |||
116 | handleShowMaterialPopup: { | 116 | handleShowMaterialPopup: { |
117 | enumerable: false, | 117 | enumerable: false, |
118 | value: function (event) { | 118 | value: function (event) { |
119 | var piButton = this.application.eventManager.componentClaimingPointer("mouse"); | ||
120 | if(piButton) { | ||
121 | this.selectedMaterialNode = piButton.element; | ||
122 | } else { | ||
123 | this.selectedMaterialNode = null; | ||
124 | } | ||
125 | |||
126 | this.materialId = event.detail.materialId; | ||
119 | this._showMaterialPopup(event.detail); | 127 | this._showMaterialPopup(event.detail); |
120 | } | 128 | } |
121 | }, | 129 | }, |
@@ -213,7 +221,11 @@ exports.MaterialsLibraryPanel = Montage.create(Component, { | |||
213 | contentHt = parseFloat(content.style.height) || content.offsetHeight || 0, | 221 | contentHt = parseFloat(content.style.height) || content.offsetHeight || 0, |
214 | contentWd = parseFloat(content.style.width) || content.offsetWidth || 0, | 222 | contentWd = parseFloat(content.style.width) || content.offsetWidth || 0, |
215 | pt = webkitConvertPointFromNodeToPage(this.selectedMaterialNode, new WebKitPoint(0, 0)); | 223 | pt = webkitConvertPointFromNodeToPage(this.selectedMaterialNode, new WebKitPoint(0, 0)); |
216 | return {top: pt.y - contentHt + 10, left: pt.x - contentWd + 10}; | 224 | if(!pt) { |
225 | return defaultPosition; | ||
226 | } else { | ||
227 | return {top: pt.y - contentHt + 10, left: pt.x - contentWd + 10}; | ||
228 | } | ||
217 | } | 229 | } |
218 | } | 230 | } |
219 | }); | 231 | }); |
diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index 39e51901..0e7a4e68 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js | |||
@@ -111,6 +111,8 @@ exports.Splitter = Montage.create(Component, { | |||
111 | else this.panel.classList.remove("collapsed"); | 111 | else this.panel.classList.remove("collapsed"); |
112 | this.element.classList.remove("collapsed"); | 112 | this.element.classList.remove("collapsed"); |
113 | if(this._resizeBar != null) this.resizeBar.classList.remove("collapsed"); | 113 | if(this._resizeBar != null) this.resizeBar.classList.remove("collapsed"); |
114 | // webkitTransitionEnd is not fired when expanded, so force draw here. | ||
115 | this.application.ninja.stage.resizeCanvases = true; | ||
114 | } | 116 | } |
115 | } | 117 | } |
116 | }, | 118 | }, |
diff --git a/js/panels/css-panel/styles-view-delegate.js b/js/panels/css-panel/styles-view-delegate.js index 6b80663a..113300b2 100644 --- a/js/panels/css-panel/styles-view-delegate.js +++ b/js/panels/css-panel/styles-view-delegate.js | |||
@@ -337,7 +337,8 @@ exports.StylesViewDelegate = Montage.create(Component, { | |||
337 | type : 'cssChange', | 337 | type : 'cssChange', |
338 | data: { | 338 | data: { |
339 | "prop": property, | 339 | "prop": property, |
340 | "value": value | 340 | "value": value, |
341 | "els": this.application.ninja.selectedElements | ||
341 | }, | 342 | }, |
342 | redraw: null | 343 | redraw: null |
343 | }); | 344 | }); |