diff options
Diffstat (limited to 'js/panels')
19 files changed, 1175 insertions, 909 deletions
diff --git a/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js b/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js index 299e603d..3eae3ea3 100755 --- a/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js +++ b/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js | |||
@@ -379,11 +379,16 @@ exports.ColorPanelPopup = Montage.create(Component, { | |||
379 | gradient.element = container; | 379 | gradient.element = container; |
380 | gradient.hack = this.hack; // TODO: Remove | 380 | gradient.hack = this.hack; // TODO: Remove |
381 | // | 381 | // |
382 | if (g && g.value && g.value.stops && g.value.mode) { | 382 | if (g && g.value && g.value.stops) { |
383 | gradient._mode = g.value.mode; | 383 | if (g.value.gradientMode) { |
384 | gradient.value = g.value.stops; | 384 | gradient._mode = g.value.gradientMode; |
385 | gradient.value = g.value.stops; | ||
386 | } else { | ||
387 | gradient._mode = 'linear'; | ||
388 | gradient.value = g.value.stops; | ||
389 | } | ||
385 | } else { | 390 | } else { |
386 | gradient._mode = this.defaultGradient.mode; | 391 | gradient._mode = this.defaultGradient.gradientMode; |
387 | gradient.value = this.defaultGradient.stops; | 392 | gradient.value = this.defaultGradient.stops; |
388 | } | 393 | } |
389 | // | 394 | // |
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js index b4eec771..b6bee37d 100755 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | |||
@@ -118,7 +118,7 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component | |||
118 | didCreate: { | 118 | didCreate: { |
119 | value: function() { | 119 | value: function() { |
120 | // Setup the drop delegate | 120 | // Setup the drop delegate |
121 | this.application.ninja.dragDropMediator.dropDelegate = this; | 121 | // this.application.ninja.dragDropMediator.dropDelegate = this; |
122 | // Loop through the component and load the JSON data for them | 122 | // Loop through the component and load the JSON data for them |
123 | this._loadComponents(); | 123 | this._loadComponents(); |
124 | } | 124 | } |
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index 508b8130..c57bb2d7 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js | |||
@@ -7,6 +7,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
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 | var Button = require("js/components/button.reel").Button; |
10 | var MaterialsModel = require("js/models/materials-model").MaterialsModel; | ||
10 | 11 | ||
11 | //////////////////////////////////////////////////////////////////////// | 12 | //////////////////////////////////////////////////////////////////////// |
12 | //Exporting as MaterialsPopup | 13 | //Exporting as MaterialsPopup |
@@ -223,7 +224,7 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
223 | (materialID === "RadialGradientMaterial") | 224 | (materialID === "RadialGradientMaterial") |
224 | ) | 225 | ) |
225 | { | 226 | { |
226 | var material = MaterialsLibrary.getMaterial( materialID ); | 227 | var material = MaterialsModel.getMaterial( materialID ); |
227 | if (material) | 228 | if (material) |
228 | { | 229 | { |
229 | this._material = material; | 230 | this._material = material; |
diff --git a/js/panels/Panel.reel/Panel.html b/js/panels/Panel.reel/Panel.html index 04e2930a..43b87940 100755 --- a/js/panels/Panel.reel/Panel.html +++ b/js/panels/Panel.reel/Panel.html | |||
@@ -113,6 +113,21 @@ | |||
113 | } | 113 | } |
114 | }, | 114 | }, |
115 | 115 | ||
116 | "disabledCondition": { | ||
117 | "module": "montage/ui/condition.reel", | ||
118 | "name": "Condition", | ||
119 | "properties": { | ||
120 | "element": {"#": "disabledCondition"} | ||
121 | }, | ||
122 | "bindings": { | ||
123 | "condition": { | ||
124 | "boundObject": {"@": "owner"}, | ||
125 | "boundObjectPropertyPath": "disabled", | ||
126 | "oneway": true | ||
127 | } | ||
128 | } | ||
129 | }, | ||
130 | |||
116 | "owner": { | 131 | "owner": { |
117 | "module": "js/panels/Panel.reel", | 132 | "module": "js/panels/Panel.reel", |
118 | "name": "Panel", | 133 | "name": "Panel", |
@@ -136,9 +151,8 @@ | |||
136 | </div> | 151 | </div> |
137 | <div class="panelBody"> | 152 | <div class="panelBody"> |
138 | <div class="panelBodyContent"> | 153 | <div class="panelBodyContent"> |
139 | <div id="panelObject" class="panelObjects"> | 154 | <div id="disabledCondition" class="panelDisabled"></div> |
140 | 155 | <div id="panelObject" class="panelObjects"></div> | |
141 | </div> | ||
142 | </div> | 156 | </div> |
143 | </div> | 157 | </div> |
144 | <div id="resizeBar" class="resizeBar"></div> | 158 | <div id="resizeBar" class="resizeBar"></div> |
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index e0bf3f18..33f9b3a7 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js | |||
@@ -9,31 +9,56 @@ var Component = require("montage/ui/component").Component; | |||
9 | 9 | ||
10 | exports.Panel = Montage.create(Component, { | 10 | exports.Panel = Montage.create(Component, { |
11 | 11 | ||
12 | name: { value: "Panel" }, | 12 | name: { |
13 | collapsedHeight: {value: 26}, | 13 | value: "Panel" |
14 | _collapsed: {value: false}, | 14 | }, |
15 | _height: { value: 200 }, | 15 | |
16 | minHeight: {value: 200 }, | 16 | _collapsed: { |
17 | maxHeight: { value: null}, | 17 | value: false |
18 | flexible: {value: true}, | 18 | }, |
19 | _locked: { value: false}, | 19 | |
20 | isResizing: {value: false }, | 20 | _height: { |
21 | resizer: {value: null }, | 21 | value: 200 |
22 | modulePath: {value: null}, | 22 | }, |
23 | moduleName: {value: null}, | 23 | |
24 | _contentComponent: {value: null}, | 24 | minHeight: { |
25 | 25 | value: 200 | |
26 | contentComponent: { | 26 | }, |
27 | get: function() { | 27 | |
28 | return this._contentComponent; | 28 | maxHeight: { |
29 | }, | 29 | value: null |
30 | set: function(val) { | 30 | }, |
31 | if (val !== null && val !== this._contentComponent) { | 31 | |
32 | this.panelContent.content = val; | 32 | flexible: { |
33 | this.panelContent.needsDraw = true; | 33 | value: true |
34 | this._contentComponent = val; | 34 | }, |
35 | } | 35 | |
36 | } | 36 | _locked: { |
37 | value: false | ||
38 | }, | ||
39 | |||
40 | isResizing: { | ||
41 | value: false | ||
42 | }, | ||
43 | |||
44 | _resizedHeight: { | ||
45 | value: 0 | ||
46 | }, | ||
47 | |||
48 | resizer: { | ||
49 | value: null | ||
50 | }, | ||
51 | |||
52 | modulePath: { | ||
53 | value: null | ||
54 | }, | ||
55 | |||
56 | moduleName: { | ||
57 | value: null | ||
58 | }, | ||
59 | |||
60 | disabled: { | ||
61 | value:false | ||
37 | }, | 62 | }, |
38 | 63 | ||
39 | collapsed: { | 64 | collapsed: { |
@@ -63,10 +88,6 @@ exports.Panel = Montage.create(Component, { | |||
63 | } | 88 | } |
64 | }, | 89 | }, |
65 | 90 | ||
66 | _resizedHeight: { | ||
67 | value: 0 | ||
68 | }, | ||
69 | |||
70 | locked: { | 91 | locked: { |
71 | get: function() { | 92 | get: function() { |
72 | return this._locked; | 93 | return this._locked; |
@@ -94,17 +115,20 @@ exports.Panel = Montage.create(Component, { | |||
94 | 115 | ||
95 | prepareForDraw: { |