diff options
Diffstat (limited to 'js/panels/properties.reel')
-rwxr-xr-x | js/panels/properties.reel/properties.css | 8 | ||||
-rwxr-xr-x | js/panels/properties.reel/properties.html | 6 | ||||
-rwxr-xr-x | js/panels/properties.reel/properties.js | 66 | ||||
-rwxr-xr-x | js/panels/properties.reel/sections/custom.reel/custom.js | 28 |
4 files changed, 54 insertions, 54 deletions
diff --git a/js/panels/properties.reel/properties.css b/js/panels/properties.reel/properties.css index 3c6b1a61..e5d698b3 100755 --- a/js/panels/properties.reel/properties.css +++ b/js/panels/properties.reel/properties.css | |||
@@ -276,10 +276,10 @@ padding-right:6px; | |||
276 | } | 276 | } |
277 | 277 | ||
278 | .propertiesPanel .colortoolbar .chipContainer { | 278 | .propertiesPanel .colortoolbar .chipContainer { |
279 | margin-top: 2px; | 279 | margin-top: 2px; |
280 | background: url(../../../../../images/colorpanel/transparent.png) repeat; | 280 | background: url(../../../../../images/colorpanel/transparent.png) repeat; |
281 | width: 40px; | 281 | width: 40px; |
282 | height: 20px; | 282 | height: 20px; |
283 | } | 283 | } |
284 | 284 | ||
285 | .propertiesPanel .button:active { | 285 | .propertiesPanel .button:active { |
diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html index 5ec78c05..1cb3dd99 100755 --- a/js/panels/properties.reel/properties.html +++ b/js/panels/properties.reel/properties.html | |||
@@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. | |||
30 | </copyright> --> | 30 | </copyright> --> |
31 | <html lang="en"> | 31 | <html lang="en"> |
32 | <head> | 32 | <head> |
33 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | 33 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
34 | <link rel="stylesheet" href="properties.css" type="text/css"> | 34 | <link rel="stylesheet" href="properties.css" type="text/css"> |
35 | <script type="text/montage-serialization"> | 35 | <script type="text/montage-serialization"> |
36 | { | 36 | { |
@@ -127,8 +127,8 @@ POSSIBILITY OF SUCH DAMAGE. | |||
127 | "threeD": {"@": "threeDProperties"} | 127 | "threeD": {"@": "threeDProperties"} |
128 | } | 128 | } |
129 | } | 129 | } |
130 | } | 130 | } |
131 | </script> | 131 | </script> |
132 | </head> | 132 | </head> |
133 | <body> | 133 | <body> |
134 | <section data-montage-id="propertiesPanel" class="propertiesPanel"> | 134 | <section data-montage-id="propertiesPanel" class="propertiesPanel"> |
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index b83ae170..1318a9b3 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js | |||
@@ -320,18 +320,18 @@ exports.Properties = Montage.create(Component, { | |||
320 | 320 | ||
321 | // Root element color chip | 321 | // Root element color chip |
322 | if(isRoot) { | 322 | if(isRoot) { |
323 | // | 323 | // |
324 | var rootBackgroundColor, backgroundChip = this.customSections[0].content.controls["background"]; | 324 | var rootBackgroundColor, backgroundChip = this.customSections[0].content.controls["background"]; |
325 | // | 325 | // |
326 | if (ElementsMediator.getProperty(el, "background-image")) { | 326 | if (ElementsMediator.getProperty(el, "background-image")) { |
327 | rootBackgroundColor = ElementsMediator.getProperty(el, "background-image"); | 327 | rootBackgroundColor = ElementsMediator.getProperty(el, "background-image"); |
328 | if (!rootBackgroundColor.mode) rootBackgroundColor = null; | 328 | if (!rootBackgroundColor.mode) rootBackgroundColor = null; |
329 | } else if (ElementsMediator.getProperty(el, "background-color")){ | 329 | } else if (ElementsMediator.getProperty(el, "background-color")){ |
330 | rootBackgroundColor = ElementsMediator.getProperty(el, "background-color"); | 330 | rootBackgroundColor = ElementsMediator.getProperty(el, "background-color"); |
331 | if (!rootBackgroundColor.mode) rootBackgroundColor = null; | 331 | if (!rootBackgroundColor.mode) rootBackgroundColor = null; |
332 | } else if (ElementsMediator.getProperty(el, "background")){ | 332 | } else if (ElementsMediator.getProperty(el, "background")){ |
333 | rootBackgroundColor = ElementsMediator.getProperty(el, "background"); | 333 | rootBackgroundColor = ElementsMediator.getProperty(el, "background"); |
334 | if (!rootBackgroundColor.mode) rootBackgroundColor = null; | 334 | if (!rootBackgroundColor.mode) rootBackgroundColor = null; |
335 | } | 335 | } |
336 | // | 336 | // |
337 | if(rootBackgroundColor) { | 337 | if(rootBackgroundColor) { |
@@ -344,7 +344,7 @@ exports.Properties = Montage.create(Component, { | |||
344 | 344 | ||
345 | 345 | ||
346 | 346 | ||
347 | var previousInput = this.application.ninja.colorController.colorModel.input; | 347 | var previousInput = this.application.ninja.colorController.colorModel.input; |
348 | customPI = PiData[this.customPi]; | 348 | customPI = PiData[this.customPi]; |
349 | // Get all the custom section for the custom PI | 349 | // Get all the custom section for the custom PI |
350 | for(var i = 0, customSec; customSec = customPI[i]; i++) { | 350 | for(var i = 0, customSec; customSec = customPI[i]; i++) { |
@@ -411,31 +411,31 @@ exports.Properties = Montage.create(Component, { | |||
411 | if (previousInput === 'chip') return; | 411 | if (previousInput === 'chip') return; |
412 | this.application.ninja.colorController.colorModel.input = previousInput; | 412 | this.application.ninja.colorController.colorModel.input = previousInput; |
413 | var color = this.application.ninja.colorController.colorModel.colorHistory[previousInput][this.application.ninja.colorController.colorModel.colorHistory[previousInput].length-1]; | 413 | var color = this.application.ninja.colorController.colorModel.colorHistory[previousInput][this.application.ninja.colorController.colorModel.colorHistory[previousInput].length-1]; |
414 | color.c.wasSetByCode = true; | 414 | color.c.wasSetByCode = true; |
415 | color.c.type = 'change'; | 415 | color.c.type = 'change'; |
416 | switch (color.m) { | 416 | switch (color.m) { |
417 | case 'rgb': | 417 | case 'rgb': |
418 | this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; | 418 | this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; |
419 | this.application.ninja.colorController.colorModel.rgb = color.c; | 419 | this.application.ninja.colorController.colorModel.rgb = color.c; |
420 | break; | 420 | break; |
421 | case 'hsl': | 421 | case 'hsl': |
422 | this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; | 422 | this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; |
423 | this.application.ninja.colorController.colorModel.hsl = color.c; | 423 | this.application.ninja.colorController.colorModel.hsl = color.c; |
424 | break; | 424 | break; |
425 | case 'hex': | 425 | case 'hex': |
426 | //TODO: Check if anything needed here | 426 | //TODO: Check if anything needed here |
427 | break; | 427 | break; |
428 | case 'gradient': | 428 | case 'gradient': |
429 | this.application.ninja.colorController.colorModel.gradient = color.c; | 429 | this.application.ninja.colorController.colorModel.gradient = color.c; |
430 | break; | 430 | break; |
431 | case 'hsv': | 431 | case 'hsv': |
432 | this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; | 432 | this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; |
433 | this.application.ninja.colorController.colorModel.hsv = color.c; | 433 | this.application.ninja.colorController.colorModel.hsv = color.c; |
434 | break; | 434 | break; |
435 | default: | 435 | default: |
436 | this.application.ninja.colorController.colorModel.applyNoColor(true); | 436 | this.application.ninja.colorController.colorModel.applyNoColor(true); |
437 | break; | 437 | break; |
438 | } | 438 | } |
439 | } | 439 | } |
440 | } | 440 | } |
441 | }, | 441 | }, |
diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index 0616da59..17b64dc2 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js | |||
@@ -117,20 +117,20 @@ exports.CustomSection = Montage.create(Component, { | |||
117 | }, | 117 | }, |
118 | 118 | ||
119 | handleChanging: { | 119 | handleChanging: { |
120 | value:function(event) { | 120 | value:function(event) { |
121 | var obj = event.currentTarget; | 121 | var obj = event.currentTarget; |
122 | this._dispatchPropEvent({"type": "changing", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj}); | 122 | this._dispatchPropEvent({"type": "changing", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj}); |
123 | } | 123 | } |
124 | }, | 124 | }, |
125 | 125 | ||
126 | handleChange: { | 126 | handleChange: { |
127 | value:function(event) { | 127 | value:function(event) { |
128 | if(event._event.wasSetByCode) return; | 128 | if(event._event.wasSetByCode) return; |
129 | 129 | ||
130 | var obj = event.currentTarget; | 130 | var obj = event.currentTarget; |
131 | this._dispatchPropEvent({"type": "change", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj}); | 131 | this._dispatchPropEvent({"type": "change", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj}); |
132 | } | 132 | } |
133 | }, | 133 | }, |
134 | 134 | ||
135 | /** | 135 | /** |
136 | * Color change handler. Hard coding the stage for now since only the stage PI uses this color chip | 136 | * Color change handler. Hard coding the stage for now since only the stage PI uses this color chip |
@@ -141,21 +141,21 @@ exports.CustomSection = Montage.create(Component, { | |||
141 | //console.log(this, event); | 141 | //console.log(this, event); |
142 | 142 | ||
143 | if (event._event.colorMode !== 'gradient' && event._event.color) { | 143 | if (event._event.colorMode !== 'gradient' && event._event.color) { |
144 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', [event._event.color.css], "Change", "pi", ''); | 144 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', [event._event.color.css], "Change", "pi", ''); |
145 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", ''); | 145 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", ''); |
146 | } else if (event._event.color) { | 146 | } else if (event._event.color) { |
147 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', [event._event.color.css], "Change", "pi", ''); | 147 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', [event._event.color.css], "Change", "pi", ''); |
148 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", ''); | 148 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", ''); |
149 | } else { | 149 | } else { |
150 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", ''); | 150 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", ''); |
151 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", ''); | 151 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", ''); |
152 | } | 152 | } |
153 | 153 | ||
154 | /* | 154 | /* |
155 | if (event._event.color && event._event.color.css) { | 155 | if (event._event.color && event._event.color.css) { |
156 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); | 156 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); |
157 | } else { | 157 | } else { |
158 |