diff options
author | hwc487 | 2012-06-29 13:01:02 -0700 |
---|---|---|
committer | hwc487 | 2012-06-29 13:01:02 -0700 |
commit | 44eba9c1f7935ae13e87a6dcf6ddea0efa63eb05 (patch) | |
tree | 77ec7650cbc397c1792254529b0430cd691fad08 /js/panels/properties.reel/sections/custom.reel/custom.js | |
parent | 230b3d0fdfd29e998b82fef9f1ff5d2ca7ef8596 (diff) | |
parent | ecd9e3b3b09695e3e7115c04e75add5a20c5c6fe (diff) | |
download | ninja-44eba9c1f7935ae13e87a6dcf6ddea0efa63eb05.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Taper
Diffstat (limited to 'js/panels/properties.reel/sections/custom.reel/custom.js')
-rwxr-xr-x | js/panels/properties.reel/sections/custom.reel/custom.js | 18 |
1 files changed, 16 insertions, 2 deletions
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); |