diff options
author | Jose Antonio Marquez | 2012-06-13 14:03:00 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-13 14:03:00 -0700 |
commit | efbe5f83157a8dcbcc209c88877d9cd0113d4d20 (patch) | |
tree | 50565e097fe4a9db59e554af179f66938fa59f1c /js/components | |
parent | ae90152ae2889a10d44c22e1eeb5bff16cc44a19 (diff) | |
parent | 682f4917d6badd105998c3dd84d031c38b51f017 (diff) | |
download | ninja-efbe5f83157a8dcbcc209c88877d9cd0113d4d20.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Color
Diffstat (limited to 'js/components')
51 files changed, 872 insertions, 194 deletions
diff --git a/js/components/SliderBase.js b/js/components/SliderBase.js index 8df868a2..a6c3ff6d 100755 --- a/js/components/SliderBase.js +++ b/js/components/SliderBase.js | |||
@@ -83,7 +83,8 @@ var SliderBase = exports.SliderBase = Montage.create(Component, { | |||
83 | } | 83 | } |
84 | this.needsDraw = true; | 84 | this.needsDraw = true; |
85 | } | 85 | } |
86 | } | 86 | }, |
87 | serializable: true | ||
87 | }, | 88 | }, |
88 | 89 | ||
89 | // Internal flags to determine what the change/changing events will contain | 90 | // Internal flags to determine what the change/changing events will contain |
@@ -153,7 +154,8 @@ var SliderBase = exports.SliderBase = Montage.create(Component, { | |||
153 | } | 154 | } |
154 | this.needsDraw = true; | 155 | this.needsDraw = true; |
155 | } | 156 | } |
156 | } | 157 | }, |
158 | serializable: true | ||
157 | }, | 159 | }, |
158 | 160 | ||
159 | _maxValue: { | 161 | _maxValue: { |
@@ -175,7 +177,8 @@ var SliderBase = exports.SliderBase = Montage.create(Component, { | |||
175 | } | 177 | } |
176 | this.needsDraw = true; | 178 | this.needsDraw = true; |
177 | } | 179 | } |
178 | } | 180 | }, |
181 | serializable: true | ||
179 | }, | 182 | }, |
180 | 183 | ||
181 | _valueCoef: { | 184 | _valueCoef: { |
diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js index bc433f52..29f49b7b 100755 --- a/js/components/combobox.reel/combobox.js +++ b/js/components/combobox.reel/combobox.js | |||
@@ -20,7 +20,8 @@ exports.Combobox = Montage.create(Component, { | |||
20 | }, | 20 | }, |
21 | 21 | ||
22 | labelField: { | 22 | labelField: { |
23 | value: null | 23 | value: null, |
24 | serializable: true | ||
24 | }, | 25 | }, |
25 | 26 | ||
26 | labelFunction: { | 27 | labelFunction: { |
@@ -28,7 +29,8 @@ exports.Combobox = Montage.create(Component, { | |||
28 | }, | 29 | }, |
29 | 30 | ||
30 | dataField: { | 31 | dataField: { |
31 | value: null | 32 | value: null, |
33 | serializable: true | ||
32 | }, | 34 | }, |
33 | 35 | ||
34 | dataFunction: { | 36 | dataFunction: { |
diff --git a/js/components/controllers/tree-controller.js b/js/components/controllers/tree-controller.js index cb95ca1d..bc3d0860 100644 --- a/js/components/controllers/tree-controller.js +++ b/js/components/controllers/tree-controller.js | |||
@@ -30,7 +30,8 @@ var TreeController = exports.TreeController = Montage.create(ObjectController, / | |||
30 | }, | 30 | }, |
31 | set: function(value) { | 31 | set: function(value) { |
32 | this._delegate = value; | 32 | this._delegate = value; |
33 | } | 33 | }, |
34 | serializable: true | ||
34 | }, | 35 | }, |
35 | 36 | ||
36 | rootKey : { | 37 | rootKey : { |
@@ -38,7 +39,13 @@ var TreeController = exports.TreeController = Montage.create(ObjectController, / | |||
38 | }, | 39 | }, |
39 | 40 | ||
40 | branchKey : { | 41 | branchKey : { |
41 | value: null | 42 | value: null, |
43 | serializable: true | ||
44 | }, | ||
45 | |||
46 | labelKey: { | ||
47 | value: null, | ||
48 | serializable: true | ||
42 | }, | 49 | }, |
43 | 50 | ||
44 | _root : { | 51 | _root : { |
diff --git a/js/components/hottext.reel/hottext.js b/js/components/hottext.reel/hottext.js index 0480597a..93e6e745 100755 --- a/js/components/hottext.reel/hottext.js +++ b/js/components/hottext.reel/hottext.js | |||
@@ -121,13 +121,19 @@ var HotText = exports.HotText = Montage.create(SliderBase, { | |||
121 | value: 2000 | 121 | value: 2000 |
122 | }, | 122 | }, |
123 | 123 | ||
124 | // Flag used to dispatch a single change event if either or both of value and units are changed | ||
125 | _unitsModified: { | ||
126 | enumerable: false, | ||
127 | value: false | ||
128 | }, | ||
129 | |||
124 | value: { | 130 | value: { |
125 | serializable: true, | 131 | serializable: true, |
126 | enumerable: true, | 132 | enumerable: true, |
127 | get: function() { | 133 | get: function() { |
128 | return this._value; | 134 | return this._value; |
129 | }, | 135 | }, |
130 | set: function(value, fromInput) { | 136 | set: function(value) { |
131 | if (isNaN(value)) { | 137 | if (isNaN(value)) { |
132 | this._valueSyncedWithInputField = false; | 138 | this._valueSyncedWithInputField = false; |
133 | this.needsDraw = true; | 139 | this.needsDraw = true; |
@@ -149,6 +155,9 @@ var HotText = exports.HotText = Montage.create(SliderBase, { | |||
149 | this._valueSyncedWithInputField = false; | 155 | this._valueSyncedWithInputField = false; |
150 | this.needsDraw = true; | 156 | this.needsDraw = true; |
151 | this._dispatchActionEvent(); | 157 | this._dispatchActionEvent(); |
158 | } else if(this._unitsModified) { | ||
159 | // Need to dispatch change event if units changed | ||
160 | this._dispatchActionEvent(); | ||
152 | } | 161 | } |
153 | } | 162 | } |
154 | }, | 163 | }, |
@@ -164,7 +173,7 @@ var HotText = exports.HotText = Montage.create(SliderBase, { | |||
164 | enumerable: false, | 173 | enumerable: false, |
165 | value: function() { | 174 | value: function() { |
166 | this._setEventFlags("change", false); | 175 | this._setEventFlags("change", false); |
167 | Object.getPropertyDescriptor(this, "value").set.call(this, this.inputFunction(this.element.value), true); |