diff options
author | Valerio Virgillito | 2012-04-09 16:47:56 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-04-09 16:47:56 -0700 |
commit | 48d4dd0f0570f4ac3556f228846ed0fd98a674e5 (patch) | |
tree | 9fb2e8a02f5d68eb72048c5d11f2f39e77daf9d4 /js/controllers/elements | |
parent | 4900f2e6e346df18b1b5a2ac89da5019644ac98a (diff) | |
download | ninja-48d4dd0f0570f4ac3556f228846ed0fd98a674e5.tar.gz |
setProperties to the montage undo/redo
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-x | js/controllers/elements/element-controller.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index fda3a3c5..adac1420 100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js | |||
@@ -47,9 +47,19 @@ exports.ElementController = Montage.create(Component, { | |||
47 | }, | 47 | }, |
48 | 48 | ||
49 | setProperties: { | 49 | setProperties: { |
50 | value: function(el, props, index) { | 50 | value: function(element, properties) { |
51 | for(var p in props) { | 51 | /* Array of properties is not supported yet |
52 | this.application.ninja.stylesController.setElementStyle(el, p, props[p][index]); | 52 | if(Array.isArray(properties)) { |
53 | |||
54 | elements.forEach(function(property) { | ||
55 | this.application.ninja.stylesController.setElementStyle(element, p, props[p][index]); | ||
56 | }); | ||
57 | } else { | ||
58 | } | ||
59 | */ | ||
60 | |||
61 | for(var property in properties) { | ||
62 | this.application.ninja.stylesController.setElementStyle(element, property, properties[property]); | ||
53 | } | 63 | } |
54 | } | 64 | } |
55 | }, | 65 | }, |