diff options
author | Jose Antonio Marquez | 2012-06-28 18:18:11 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-28 18:18:11 -0700 |
commit | 2f1ad000aeda418696d6ed74202db5e6565ab671 (patch) | |
tree | 92aa8ba48645a621c6f335bfc101335ce69b496c /js/controllers | |
parent | a859432f0cc5746e2855c16565a75391ea657772 (diff) | |
parent | 8cf2345f5ce1f03ec06a1f34e0ef2dba0d5055bd (diff) | |
download | ninja-2f1ad000aeda418696d6ed74202db5e6565ab671.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/controllers')
-rw-r--r-- | js/controllers/objects-controller.js | 6 | ||||
-rw-r--r-- | js/controllers/presets-controller.js | 20 |
2 files changed, 23 insertions, 3 deletions
diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js index 6557c14e..6ca869ba 100644 --- a/js/controllers/objects-controller.js +++ b/js/controllers/objects-controller.js | |||
@@ -27,7 +27,7 @@ var objectsController = exports.ObjectsController = Montage.create(Montage, { | |||
27 | setTimeout(function() { | 27 | setTimeout(function() { |
28 | this.bindToModelObjects(); | 28 | this.bindToModelObjects(); |
29 | }.bind(this), 1000); | 29 | }.bind(this), 1000); |
30 | 30 | this.currentObjectBindings = []; | |
31 | this._currentDocument = doc; | 31 | this._currentDocument = doc; |
32 | }, | 32 | }, |
33 | enumerable : false | 33 | enumerable : false |
@@ -150,9 +150,9 @@ var objectsController = exports.ObjectsController = Montage.create(Montage, { | |||
150 | var properties = []; | 150 | var properties = []; |
151 | 151 | ||
152 | for(var key in object) { | 152 | for(var key in object) { |
153 | if(object.hasOwnProperty(key)) { | 153 | //if(object.hasOwnProperty(key)) { |
154 | properties.push(key); | 154 | properties.push(key); |
155 | } | 155 | //} |
156 | } | 156 | } |
157 | 157 | ||
158 | if(excludeUnderscoreProperties) { | 158 | if(excludeUnderscoreProperties) { |
diff --git a/js/controllers/presets-controller.js b/js/controllers/presets-controller.js index 4c177189..65a56a74 100644 --- a/js/controllers/presets-controller.js +++ b/js/controllers/presets-controller.js | |||
@@ -53,6 +53,8 @@ exports.PresetsController = Montage.create(Component, { | |||
53 | //// TODO: replace this hack when webkit supports transitionStart event (see above) | 53 | //// TODO: replace this hack when webkit supports transitionStart event (see above) |
54 | window.clearTimeout(el.njTimeout); | 54 | window.clearTimeout(el.njTimeout); |
55 | 55 | ||
56 | this._dispatchChange(); | ||
57 | |||
56 | el.classList.remove(this.transitionClass); | 58 | el.classList.remove(this.transitionClass); |
57 | el.removeEventListener("webkitTransitionEnd", this, true); | 59 | el.removeEventListener("webkitTransitionEnd", this, true); |
58 | } | 60 | } |
@@ -107,6 +109,10 @@ exports.PresetsController = Montage.create(Component, { | |||
107 | } | 109 | } |
108 | }, this); | 110 | }, this); |
109 | 111 | ||
112 | if(!useTransition) { | ||
113 | this._dispatchChange(); | ||
114 | } | ||
115 | |||
110 | } | 116 | } |
111 | }, | 117 | }, |
112 | 118 | ||
@@ -126,5 +132,19 @@ exports.PresetsController = Montage.create(Component, { | |||
126 | 132 | ||
127 | return keysString; | 133 | return keysString; |
128 | } | 134 | } |
135 | }, | ||
136 | |||
137 | _dispatchChange : { | ||
138 | value: function(property, value) { | ||
139 | this.application.ninja.stage.updatedStage = true; | ||
140 | NJevent('elementChange', { | ||
141 | type : 'presetChange', | ||
142 | data: { | ||
143 | "prop": property, | ||
144 | "value": value | ||
145 | }, | ||
146 | redraw: null | ||
147 | }); | ||
148 | } | ||
129 | } | 149 | } |
130 | }); \ No newline at end of file | 150 | }); \ No newline at end of file |