diff options
author | Jonathan Duran | 2012-06-29 15:16:11 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-29 15:16:11 -0700 |
commit | 5496f0060c5f43e7951a110241a18b9e631761bb (patch) | |
tree | bd1c8f20eb5b6ae0e24fcae28f16eb13cb969747 /js/panels/properties.reel | |
parent | 3aa1242147264351b7d827fa25ecb5dc42bc2fb0 (diff) | |
parent | ec69c8761f798eaf39c4a154997f8bc54b7e47f4 (diff) | |
download | ninja-5496f0060c5f43e7951a110241a18b9e631761bb.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts:
js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
Signed-off-by: Jonathan Duran <jduran@motorola.com>
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.js | 19 | ||||
-rwxr-xr-x | js/panels/properties.reel/sections/custom.reel/custom.js | 18 |
3 files changed, 35 insertions, 10 deletions
diff --git a/js/panels/properties.reel/properties.css b/js/panels/properties.reel/properties.css index d1aa750a..786eb57a 100755 --- a/js/panels/properties.reel/properties.css +++ b/js/panels/properties.reel/properties.css | |||
@@ -314,11 +314,11 @@ input label { | |||
314 | width:45px; | 314 | width:45px; |
315 | } | 315 | } |
316 | 316 | ||
317 | .propertiesPanel div.montage-button:disabled { | 317 | .propertiesPanel div[type=button]:disabled { |
318 | opacity: 0.4; | 318 | opacity: 0.4; |
319 | } | 319 | } |
320 | 320 | ||
321 | .propertiesPanel div.montage-button { | 321 | .propertiesPanel div[type=button] { |
322 | font-size: 9px; | 322 | font-size: 9px; |
323 | cursor: pointer; | 323 | cursor: pointer; |
324 | display: block; | 324 | display: block; |
@@ -336,10 +336,10 @@ input label { | |||
336 | height: 14px; | 336 | height: 14px; |
337 | } | 337 | } |
338 | 338 | ||
339 | .propertiesPanel div.montage-button:active { | 339 | .propertiesPanel div[type=button]:active { |
340 | background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #505050 100%); | 340 | background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #505050 100%); |
341 | } | 341 | } |
342 | 342 | ||
343 | .propertiesPanel div.montage-button:hover { | 343 | .propertiesPanel div[type=button]:hover { |
344 | -webkit-box-shadow: 0px 0px 3px #b4b4b4; | 344 | -webkit-box-shadow: 0px 0px 3px #b4b4b4; |
345 | } \ No newline at end of file | 345 | } \ No newline at end of file |
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 5719a63d..b2941fe8 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js | |||
@@ -296,9 +296,20 @@ exports.Properties = Montage.create(Component, { | |||
296 | 296 | ||
297 | // Root element color chip | 297 | // Root element color chip |
298 | if(isRoot) { | 298 | if(isRoot) { |
299 | var backgroundChip = this.customSections[0].content.controls["background"]; | 299 | // |
300 | var rootBackgroundColor = ElementsMediator.getProperty(el, "background"); | 300 | var rootBackgroundColor, backgroundChip = this.customSections[0].content.controls["background"]; |
301 | 301 | // | |
302 | if (ElementsMediator.getProperty(el, "background-image")) { | ||
303 | rootBackgroundColor = ElementsMediator.getProperty(el, "background-image"); | ||
304 | if (!rootBackgroundColor.mode) rootBackgroundColor = null; | ||
305 | } else if (ElementsMediator.getProperty(el, "background-color")){ | ||
306 | rootBackgroundColor = ElementsMediator.getProperty(el, "background-color"); | ||
307 | if (!rootBackgroundColor.mode) rootBackgroundColor = null; | ||
308 | } else if (ElementsMediator.getProperty(el, "background")){ | ||
309 | rootBackgroundColor = ElementsMediator.getProperty(el, "background"); | ||
310 | if (!rootBackgroundColor.mode) rootBackgroundColor = null; | ||
311 | } | ||
312 | // | ||
302 | if(rootBackgroundColor) { | 313 | if(rootBackgroundColor) { |
303 | backgroundChip.color = rootBackgroundColor; | 314 | backgroundChip.color = rootBackgroundColor; |
304 | } else { | 315 | } else { |
@@ -373,7 +384,7 @@ exports.Properties = Montage.create(Component, { | |||
373 | } | 384 | } |
374 | } | 385 | } |
375 | } | 386 | } |
376 | 387 | if (previousInput === 'chip') return; | |
377 | this.application.ninja.colorController.colorModel.input = previousInput; | 388 | this.application.ninja.colorController.colorModel.input = previousInput; |
378 | var color = this.application.ninja.colorController.colorModel.colorHistory[previousInput][this.application.ninja.colorController.colorModel.colorHistory[previousInput].length-1]; | 389 | var color = this.application.ninja.colorController.colorModel.colorHistory[previousInput][this.application.ninja.colorController.colorModel.colorHistory[previousInput].length-1]; |
379 | color.c.wasSetByCode = true; | 390 | color.c.wasSetByCode = true; |
diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index 9c31cf45..ed4616da 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js | |||
@@ -20,7 +20,7 @@ var Dropdown = require("js/components/combobox.reel").Combobox; | |||
20 | var TextField = require("js/components/textfield.reel").TextField; | 20 | var TextField = require("js/components/textfield.reel").TextField; |
21 | var LabelCheckbox = require("js/components/ui/label-checkbox.reel").LabelCheckbox; | 21 | var LabelCheckbox = require("js/components/ui/label-checkbox.reel").LabelCheckbox; |
22 | var ColorChip = require("js/components/ui/color-chip.reel").ColorChip; | 22 | var ColorChip = require("js/components/ui/color-chip.reel").ColorChip; |
23 | var Button = require("montage/ui/button.reel").Button; | 23 | var Button = require("montage/ui/native/button.reel").Button; |
24 | 24 | ||
25 | exports.CustomSection = Montage.create(Component, { | 25 | exports.CustomSection = Montage.create(Component, { |
26 | 26 | ||
@@ -115,11 +115,25 @@ exports.CustomSection = Montage.create(Component, { | |||
115 | value: function(event) { | 115 | value: function(event) { |
116 | // Change the stage color for now | 116 | // Change the stage color for now |
117 | //console.log(this, event); | 117 | //console.log(this, event); |
118 | if (event._event.color && event._event.color.css) { | 118 | |
119 | if (event._event.colorMode !== 'gradient' && event._event.color) { | ||
120 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', [event._event.color.css], "Change", "pi", ''); | ||
121 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", ''); | ||
122 | } else if (event._event.color) { | ||
123 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', [event._event.color.css], "Change", "pi", ''); | ||
124 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", ''); | ||
125 | } else { | ||
126 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", ''); | ||
127 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", ''); | ||
128 | } | ||
129 | |||
130 | /* | ||
131 | if (event._event.color && event._event.color.css) { | ||
119 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); | 132 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); |
120 | } else { | 133 | } else { |
121 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, ['none'], "Change", "pi", ''); | 134 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, ['none'], "Change", "pi", ''); |
122 | } | 135 | } |
136 | */ | ||
123 | /* | 137 | /* |
124 | var propEvent = document.createEvent("CustomEvent"); | 138 | var propEvent = document.createEvent("CustomEvent"); |
125 | propEvent.initEvent("propertyChange", true, true); | 139 | propEvent.initEvent("propertyChange", true, true); |