diff options
author | Valerio Virgillito | 2012-06-26 13:15:26 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-26 13:15:26 -0700 |
commit | 87a8b62f71bb72274c3dd1fa389e88c12d482ebb (patch) | |
tree | bf9f995e2972c0a61355f24e64231cdf0b2c86b5 /js/components/tools-properties/text-properties.reel/text-properties.js | |
parent | 8821e662484aedb027e26a873883e6ca3fb55a51 (diff) | |
parent | a95bba25c3ba6e31784a452e9b94748cc870ba5d (diff) | |
download | ninja-87a8b62f71bb72274c3dd1fa389e88c12d482ebb.tar.gz |
Merge pull request #323 from dhg637/binding
Binding View - Binding Tool & Binding Panel
Diffstat (limited to 'js/components/tools-properties/text-properties.reel/text-properties.js')
-rwxr-xr-x | js/components/tools-properties/text-properties.reel/text-properties.js | 160 |
1 files changed, 68 insertions, 92 deletions
diff --git a/js/components/tools-properties/text-properties.reel/text-properties.js b/js/components/tools-properties/text-properties.reel/text-properties.js index 7fe5537c..c5729e98 100755 --- a/js/components/tools-properties/text-properties.reel/text-properties.js +++ b/js/components/tools-properties/text-properties.reel/text-properties.js | |||
@@ -72,7 +72,7 @@ exports.TextProperties = Montage.create(ToolProperties, { | |||
72 | 72 | ||
73 | handleEditorSelect: { | 73 | handleEditorSelect: { |
74 | value: function(e) { | 74 | value: function(e) { |
75 | this.application.ninja.stage.textTool.updateStates(); | 75 | //this.application.ninja.stage.textTool.updateStates(); |
76 | // this.fontSelection.value = this.application.ninja.stage.textTool.states.fontname; | 76 | // this.fontSelection.value = this.application.ninja.stage.textTool.states.fontname; |
77 | // | 77 | // |
78 | // for( var i = 0; i < this.fontSize.items.length; i++) { | 78 | // for( var i = 0; i < this.fontSize.items.length; i++) { |
@@ -96,30 +96,6 @@ exports.TextProperties = Montage.create(ToolProperties, { | |||
96 | 96 | ||
97 | } | 97 | } |
98 | }, | 98 | }, |
99 | |||
100 | handleBtnBoldAction: { | ||
101 | value: function(e) { | ||
102 | this.application.ninja.stage.textTool.doAction("bold"); | ||
103 | } | ||
104 | }, | ||
105 | |||
106 | handleBtnItalicAction: { | ||
107 | value: function(e) { | ||
108 | this.application.ninja.stage.textTool.doAction("italic"); | ||
109 | } | ||
110 | }, | ||
111 | |||
112 | handleBtnUnderlineAction: { | ||
113 | value: function(e) { | ||
114 | this.application.ninja.stage.textTool.doAction("underline"); | ||
115 | } | ||
116 | }, | ||
117 | |||
118 | handleBtnStrikethroughAction: { | ||
119 | value: function(e) { | ||
120 | this.application.ninja.stage.textTool.doAction("strikethrough"); | ||
121 | } | ||
122 | }, | ||
123 | 99 | ||
124 | handleAlignLeftAction: { | 100 | handleAlignLeftAction: { |
125 | value: function(e) { | 101 | value: function(e) { |
@@ -211,87 +187,83 @@ exports.TextProperties = Montage.create(ToolProperties, { | |||
211 | 187 | ||
212 | Object.defineBinding(this.btnBold, "pressed", { | 188 | Object.defineBinding(this.btnBold, "pressed", { |
213 | boundObject: this.application.ninja.stage.textTool, | 189 | boundObject: this.application.ninja.stage.textTool, |
214 | boundObjectPropertyPath: "states.bold", | 190 | boundObjectPropertyPath: "bold", |
215 | boundValueMutator: this.validatePressed, | 191 | oneway: false |
216 | oneway: true | ||
217 | }); | 192 | }); |
218 | 193 | ||
219 | Object.defineBinding(this.btnItalic, "pressed", { | 194 | Object.defineBinding(this.btnItalic, "pressed", { |
220 | boundObject: this.application.ninja.stage.textTool, | 195 | boundObject: this.application.ninja.stage.textTool, |
221 | boundObjectPropertyPath: "states.italic", | 196 | boundObjectPropertyPath: "italic", |
222 | boundValueMutator: this.validatePressed, | 197 | oneway: false |
223 | oneway: true | ||
224 | }); | 198 | }); |
225 | 199 | ||
226 | Object.defineBinding(this.btnUnderline, "pressed", { | 200 | Object.defineBinding(this.btnUnderline, "pressed", { |
227 | boundObject: this.application.ninja.stage.textTool, | 201 | boundObject: this.application.ninja.stage.textTool, |
228 | boundObjectPropertyPath: "states.underline", | 202 | boundObjectPropertyPath: "underline", |
229 | boundValueMutator: this.validatePressed, | 203 | oneway: false |
230 | oneway: true | ||
231 | }); | 204 | }); |
232 | 205 | ||
233 | Object.defineBinding(this.btnStrikethrough, "pressed", { | 206 | Object.defineBinding(this.btnStrikethrough, "pressed", { |
234 | boundObject: this.application.ninja.stage.textTool, | 207 | boundObject: this.application.ninja.stage.textTool, |
235 | boundObjectPropertyPath: "states.strikethrough", | 208 | boundObjectPropertyPath: "strikeThrough", |
236 | boundValueMutator: this.validatePressed, | 209 | oneway: false |
237 | oneway: true | ||
238 | }); | 210 | }); |
239 | 211 | ||
240 | Object.defineBinding(this.alignLeft, "pressed", { | 212 | Object.defineBinding(this.alignLeft, "pressed", { |
241 | boundObject: this.application.ninja.stage.textTool, | 213 | boundObject: this.application.ninja.stage.textTool, |
242 | boundObjectPropertyPath: "states.justifyleft", | 214 | boundObjectPropertyPath: "justify", |
243 | boundValueMutator: this.validatePressed, | 215 | boundValueMutator: this.validateJustify, |
244 | oneway: true | 216 | oneway: false |
245 | }); | ||
246 | |||
247 | Object.defineBinding(this.alignCenter, "pressed", { | ||
248 | boundObject: this.application.ninja.stage.textTool, | ||
249 | boundObjectPropertyPath: "states.justifycenter", | ||
250 | boundValueMutator: this.validatePressed, | ||
251 | oneway: true | ||
252 | }); | ||
253 | |||
254 | Object.defineBinding(this.alignRight, "pressed", { | ||
255 | boundObject: this.application.ninja.stage.textTool, | ||
256 | boundObjectPropertyPath: "states.justifyright", | ||
257 | boundValueMutator: this.validatePressed, | ||
258 | oneway: true | ||
259 | }); | ||
260 | |||
261 | Object.defineBinding(this.alignJustify, "pressed", { | ||
262 | boundObject: this.application.ninja.stage.textTool, | ||
263 | boundObjectPropertyPath: "states.justifyfull", | ||
264 | boundValueMutator: this.validatePressed, | ||
265 | oneway: true | ||
266 | }); | ||
267 | |||
268 | Object.defineBinding(this.numberedList, "pressed", { | ||
269 | boundObject: this.application.ninja.stage.textTool, | ||
270 | boundObjectPropertyPath: "states.insertorderedlist", | ||
271 | boundValueMutator: this.validatePressed, | ||
272 | oneway: true | ||
273 | }); | ||
274 | |||
275 | Object.defineBinding(this.bulletedList, "pressed", { | ||
276 | boundObject: this.application.ninja.stage.textTool, | ||
277 | boundObjectPropertyPath: "states.insertunorderedlist", | ||
278 | boundValueMutator: this.validatePressed, | ||
279 | oneway: true | ||
280 | }); | ||
281 | |||
282 | Object.defineBinding(this.fontSelection, "value", { | ||
283 | boundObject: this.application.ninja.stage.textTool, | ||
284 | boundObjectPropertyPath: "states.fontname", | ||
285 | boundValueMutator: this.validateFont, | ||
286 | oneway: true | ||
287 | }); | ||
288 | |||
289 | Object.defineBinding(this.fontSize, "value", { | ||
290 | boundObject: this.application.ninja.stage.textTool, | ||
291 | boundObjectPropertyPath: "states.fontsize", | ||
292 | boundValueMutator: this.validateFontSize.bind(this), | ||
293 | oneway: true | ||
294 | }); | 217 | }); |
218 | // | ||
219 | // Object.defineBinding(this.alignCenter, "pressed", { | ||
220 | // boundObject: this.application.ninja.stage.textTool, | ||
221 | // boundObjectPropertyPath: "justifycenter", | ||
222 | // boundValueMutator: this.validatePressed, | ||
223 | // oneway: true | ||
224 | // }); | ||
225 | // | ||
226 | // Object.defineBinding(this.alignRight, "pressed", { | ||
227 | // boundObject: this.application.ninja.stage.textTool, | ||
228 | // boundObjectPropertyPath: "justifyright", | ||
229 | // boundValueMutator: this.validatePressed, | ||
230 | // oneway: true | ||
231 | // }); | ||
232 | // | ||
233 | // Object.defineBinding(this.alignJustify, "pressed", { | ||
234 | // boundObject: this.application.ninja.stage.textTool, | ||
235 | // boundObjectPropertyPath: "justifyfull", | ||
236 | // boundValueMutator: this.validatePressed, | ||
237 | // oneway: true | ||
238 | // }); | ||
239 | // | ||
240 | // Object.defineBinding(this.numberedList, "pressed", { | ||
241 | // boundObject: this.application.ninja.stage.textTool, | ||
242 | // boundObjectPropertyPath: "insertorderedlist", | ||
243 | // boundValueMutator: this.validatePressed, | ||
244 | // oneway: true | ||
245 | // }); | ||
246 | // | ||
247 | // Object.defineBinding(this.bulletedList, "pressed", { | ||
248 | // boundObject: this.application.ninja.stage.textTool, | ||
249 | // boundObjectPropertyPath: "insertunorderedlist", | ||
250 | // boundValueMutator: this.validatePressed, | ||
251 | // oneway: true | ||
252 | // }); | ||
253 | // | ||
254 | // Object.defineBinding(this.fontSelection, "value", { | ||
255 | // boundObject: this.application.ninja.stage.textTool, | ||
256 | // boundObjectPropertyPath: "fontname", | ||
257 | // boundValueMutator: this.validateFont, | ||