diff options
author | Ananya Sen | 2012-06-28 15:19:28 -0700 |
---|---|---|
committer | Ananya Sen | 2012-06-28 15:19:28 -0700 |
commit | 624acffc0619d879deaa6dcd8ce3c0cfeaf2227a (patch) | |
tree | ca53a666a93f9bed8912a5c3211ba84fc603c58f /js/panels/properties.reel/sections | |
parent | e4d3e040e521648ec9a6d0e0db2e62754f2d8882 (diff) | |
parent | 3ba9accb8e1887bfd6f1f912b6135073a3d9c70c (diff) | |
download | ninja-624acffc0619d879deaa6dcd8ce3c0cfeaf2227a.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into bugfix-master
Diffstat (limited to 'js/panels/properties.reel/sections')
-rwxr-xr-x | js/panels/properties.reel/sections/custom.reel/custom.js | 16 |
1 files changed, 15 insertions, 1 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..5112fca9 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js | |||
@@ -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); |