diff options
Diffstat (limited to 'js/panels/Materials/materials-popup.reel')
3 files changed, 52 insertions, 17 deletions
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.css b/js/panels/Materials/materials-popup.reel/materials-popup.css index 89233c64..2d339411 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.css +++ b/js/panels/Materials/materials-popup.reel/materials-popup.css | |||
@@ -37,21 +37,53 @@ | |||
37 | .mp_property | 37 | .mp_property |
38 | { | 38 | { |
39 | height:40px; | 39 | height:40px; |
40 | position: relative; | ||
40 | } | 41 | } |
41 | 42 | ||
42 | .mp_property > .prop-label | 43 | .mp_property > .prop-label |
43 | { | 44 | { |
44 | float: left; | 45 | position:relative; |
45 | /*width:86px;*/ | 46 | top:12px; |
46 | margin: 0px 8px 2px 5px; | 47 | float: left; |
48 | width: 100px; | ||
47 | } | 49 | } |
48 | 50 | ||
49 | .mp_property > .prop-controller | 51 | .mp_property > .prop-controller |
50 | { | 52 | { |
51 | float: right; | 53 | position:relative; |
52 | clear: left; | 54 | top:12px; |
53 | width: auto; | 55 | left: 10px; |
54 | margin: 0px 0px 3px 0px; | 56 | float: left; |
57 | } | ||
58 | |||
59 | .mp_property .hottext, | ||
60 | .mp_property .hottextInput | ||
61 | { | ||
62 | width: 30px; | ||
63 | } | ||
64 | |||
65 | .mp_property .button | ||
66 | { | ||
67 | width: 30px; | ||
68 | height: 20px; | ||
69 | } | ||
70 | |||
71 | .mp_property .inputRow | ||
72 | { | ||
73 | top: 8px; | ||
74 | position: relative; | ||
75 | } | ||
76 | |||
77 | .mp_properties_list | ||
78 | { | ||
79 | padding-bottom: 8px; | ||
80 | } | ||
81 | |||
82 | .mp_properties_list > .mp_property > .colortoolbar | ||
83 | { | ||
84 | width: 27px !important; | ||
85 | height: 27px !important; | ||
86 | overflow:hidden !important; | ||
55 | } | 87 | } |
56 | 88 | ||
57 | .mp_buttons { | 89 | .mp_buttons { |
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.html b/js/panels/Materials/materials-popup.reel/materials-popup.html index de4f98c1..ae0ee2c8 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.html +++ b/js/panels/Materials/materials-popup.reel/materials-popup.html | |||
@@ -14,7 +14,7 @@ | |||
14 | <script type="text/montage-serialization"> | 14 | <script type="text/montage-serialization"> |
15 | { | 15 | { |
16 | "okButton": { | 16 | "okButton": { |
17 | "module": "js/components/button.reel", | 17 | "module": "montage/ui/button.reel", |
18 | "name": "Button", | 18 | "name": "Button", |
19 | "properties": { | 19 | "properties": { |
20 | "element": {"#": "mp_ok_btn"}, | 20 | "element": {"#": "mp_ok_btn"}, |
@@ -22,7 +22,7 @@ | |||
22 | } | 22 | } |
23 | }, | 23 | }, |
24 | "cancelButton": { | 24 | "cancelButton": { |
25 | "module": "js/components/button.reel", | 25 | "module": "montage/ui/button.reel", |
26 | "name": "Button", | 26 | "name": "Button", |
27 | "properties": { | 27 | "properties": { |
28 | "element": {"#": "mp_cancel_btn"}, | 28 | "element": {"#": "mp_cancel_btn"}, |
@@ -104,15 +104,15 @@ | |||
104 | 104 | ||
105 | <hr /> | 105 | <hr /> |
106 | 106 | ||
107 | <div id="mp_properties_list" class="mp_properties_list" style="-webkit-user-select: none;"> | 107 | <div id="mp_properties_list" class="mp_properties_list"> |
108 | <div id="mp_property" class="mp_property"></div> | 108 | <div id="mp_property" class="mp_property"></div> |
109 | </div> | 109 | </div> |
110 | 110 | ||
111 | <hr /> | 111 | <hr /> |
112 | 112 | ||
113 | <div id="mp_buttons" class="mp_buttons"> | 113 | <div id="mp_buttons" class="mp_buttons"> |
114 | <button id="mp_cancel_btn" class="mp_cancel_btn"></button> | 114 | <button id="mp_cancel_btn" class="mp_cancel_btn nj-skinned"></button> |
115 | <button id="mp_ok_btn" class="mp_ok_btn"></button> | 115 | <button id="mp_ok_btn" class="mp_ok_btn nj-skinned"></button> |
116 | </div> | 116 | </div> |
117 | 117 | ||
118 | </div> | 118 | </div> |
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index c57bb2d7..bbccf45d 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js | |||
@@ -5,9 +5,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | Component = require("montage/ui/component").Component; | 8 | Component = require("montage/ui/component").Component, |
9 | var Button = require("js/components/button.reel").Button; | 9 | MaterialsModel = require("js/models/materials-model").MaterialsModel; |
10 | var MaterialsModel = require("js/models/materials-model").MaterialsModel; | ||
11 | 10 | ||
12 | //////////////////////////////////////////////////////////////////////// | 11 | //////////////////////////////////////////////////////////////////////// |
13 | //Exporting as MaterialsPopup | 12 | //Exporting as MaterialsPopup |
@@ -215,7 +214,11 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
215 | enumerable: true, | 214 | enumerable: true, |
216 | value: function(materialID) | 215 | value: function(materialID) |
217 | { | 216 | { |
218 | this._materialName = materialID; | 217 | // Note that setting Array.length = 0 will empty arrays, |
218 | // which is fine if you use getMaterialData to get a new array, but not for the | ||
219 | // dummyData arrays. | ||
220 | this._materialsData.length = 0; | ||
221 | this._materialName = materialID; | ||
219 | if( | 222 | if( |
220 | (materialID === "UberMaterial") || | 223 | (materialID === "UberMaterial") || |
221 | (materialID === "FlatMaterial") || | 224 | (materialID === "FlatMaterial") || |
@@ -234,7 +237,7 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
234 | } | 237 | } |
235 | else | 238 | else |
236 | { | 239 | { |
237 | this.materialsData = this._dummyData1; | 240 | this.materialsData = this._dummyData1.slice(0); |
238 | } | 241 | } |
239 | 242 | ||
240 | this.needsDraw = true; | 243 | this.needsDraw = true; |