diff options
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-x | js/panels/properties.reel/properties.js | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index eb362796..b292a66a 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js | |||
@@ -48,6 +48,7 @@ exports.Properties = Montage.create(Component, { | |||
48 | value : function() { | 48 | value : function() { |
49 | this.eventManager.addEventListener("openDocument", this, false); | 49 | this.eventManager.addEventListener("openDocument", this, false); |
50 | this.eventManager.addEventListener("selectionChange", this, false); | 50 | this.eventManager.addEventListener("selectionChange", this, false); |
51 | this.eventManager.addEventListener("closeDocument", this, false); | ||
51 | 52 | ||
52 | // This will be a toggle option | 53 | // This will be a toggle option |
53 | if(this.application.ninja.appData.PILiveUpdate) { | 54 | if(this.application.ninja.appData.PILiveUpdate) { |
@@ -76,6 +77,12 @@ exports.Properties = Montage.create(Component, { | |||
76 | } | 77 | } |
77 | }, | 78 | }, |
78 | 79 | ||
80 | handleCloseDocument: { | ||
81 | value: function(){ | ||
82 | this.clear(); | ||
83 | } | ||
84 | }, | ||
85 | |||
79 | /** | 86 | /** |
80 | * Blur and Key up to handle change in the Element ID field. | 87 | * Blur and Key up to handle change in the Element ID field. |
81 | */ | 88 | */ |
@@ -172,6 +179,7 @@ exports.Properties = Montage.create(Component, { | |||
172 | this.elementId.value = ""; | 179 | this.elementId.value = ""; |
173 | this.elementClass.value = ""; | 180 | this.elementClass.value = ""; |
174 | this.customPi = null; | 181 | this.customPi = null; |
182 | this.customSections = []; | ||
175 | } | 183 | } |
176 | }, | 184 | }, |
177 | 185 | ||
@@ -211,27 +219,29 @@ exports.Properties = Montage.create(Component, { | |||
211 | controls = this.customSections[n].content.controls; | 219 | controls = this.customSections[n].content.controls; |
212 | if(controls["colorSelect"]) { | 220 | if(controls["colorSelect"]) { |
213 | controls["colorSelect"].destroy(); | 221 | controls["colorSelect"].destroy(); |
214 | } else if(controls["stageBackground"]) { | 222 | } else if(controls["background"]) { |
215 | controls["stageBackground"].destroy(); | 223 | controls["background"].destroy(); |
216 | } | 224 | } |
217 | } | 225 | } |
218 | 226 | ||
219 | this.customPi = el.elementModel.pi; | 227 | this.customPi = el.elementModel.pi; |
220 | this.displayCustomProperties(el, el.elementModel.pi); | 228 | this.displayCustomProperties(el, el.elementModel.pi); |
221 | } | ||
222 | 229 | ||
223 | // Root element color chip | 230 | // Root element color chip |
224 | if(isRoot) { | 231 | if(isRoot) { |
225 | var backgroundChip = this.customSections[0].content.controls["background"]; | 232 | var backgroundChip = this.customSections[0].content.controls["background"]; |
226 | var rootBackgroundColor = ElementsMediator.getProperty(el, "background"); | 233 | var rootBackgroundColor = ElementsMediator.getProperty(el, "background"); |
227 | 234 | ||
228 | if(rootBackgroundColor) { | 235 | if(rootBackgroundColor) { |
229 | backgroundChip.color = rootBackgroundColor; | 236 | backgroundChip.color = rootBackgroundColor; |
230 | } else { | 237 | } else { |
231 | backgroundChip.color = null; | 238 | backgroundChip.color = null; |
239 | } | ||
232 | } | 240 | } |
233 | } | 241 | } |
234 | 242 | ||
243 | |||
244 | |||
235 | var previousInput = this.application.ninja.colorController.colorModel.input; | 245 | var previousInput = this.application.ninja.colorController.colorModel.input; |
236 | customPI = PiData[this.customPi]; | 246 | customPI = PiData[this.customPi]; |
237 | // Get all the custom section for the custom PI | 247 | // Get all the custom section for the custom PI |