diff options
author | Armen Kesablyan | 2012-06-05 12:55:34 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-05 12:55:34 -0700 |
commit | cd089f6692934a68bda7c303928a7c78dd13ac07 (patch) | |
tree | a00ac46c5d64ecb4f2f750a5621489dbde9ac12a /js/stage/binding-view.reel/binding-hud-option.reel | |
parent | 31ba58a349ae6b52e927ce4fb666927abf54aaa0 (diff) | |
download | ninja-cd089f6692934a68bda7c303928a7c78dd13ac07.tar.gz |
Changes for binding View
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/stage/binding-view.reel/binding-hud-option.reel')
-rwxr-xr-x | js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js b/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js index 07cbff11..78189415 100755 --- a/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js +++ b/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js | |||
@@ -12,30 +12,53 @@ var Montage = require("montage/core/core").Montage, | |||
12 | Component = require("montage/ui/component").Component; | 12 | Component = require("montage/ui/component").Component; |
13 | 13 | ||
14 | exports.BindingHudOption = Montage.create(Component, { | 14 | exports.BindingHudOption = Montage.create(Component, { |
15 | _title: { | ||
16 | value: null | ||
17 | }, | ||
18 | |||
15 | title: { | 19 | title: { |
16 | value: "value" | 20 | get: function() { |
21 | return this._title; | ||
22 | }, | ||
23 | set: function(val) { | ||
24 | this._title = val; | ||
25 | this.needsDraw = true; | ||
26 | } | ||
17 | }, | 27 | }, |
18 | _bindings: { | 28 | |
29 | bound: { | ||
30 | value: false | ||
31 | }, | ||
32 | |||
33 | _hudOptions: { | ||
19 | value: [] | 34 | value: [] |
20 | }, | 35 | }, |
21 | 36 | ||
22 | bindings: { | 37 | hudOptions: { |
23 | get: function() { | 38 | get: function() { |
24 | return this._bindings; | 39 | return this._hudOptions; |
25 | }, | 40 | }, |
26 | set: function(val) { | 41 | set: function(val) { |
27 | this._bindings = val; | 42 | this._hudOptions = val; |
43 | this.title = val.title; | ||
44 | this.bound = val.bound; | ||
28 | this.needsDraw = true; | 45 | this.needsDraw = true; |
29 | } | 46 | } |
30 | }, | 47 | }, |
31 | 48 | ||
32 | draw: { | 49 | draw: { |
33 | value:function() { | 50 | value:function() { |
34 | if(this.bindings.length > 0) { | 51 | if(this.bound) { |
52 | console.log(this.title); | ||
35 | this.element.classList.add("bound"); | 53 | this.element.classList.add("bound"); |
36 | } else { | 54 | } else { |
37 | this.element.classList.remove("bound"); | 55 | this.element.classList.remove("bound"); |
38 | } | 56 | } |
57 | // if(this.bindings.length > 0) { | ||
58 | // this.element.classList.add("bound"); | ||
59 | // } else { | ||
60 | // this.element.classList.remove("bound"); | ||
61 | // } | ||
39 | } | 62 | } |
40 | } | 63 | } |
41 | }); \ No newline at end of file | 64 | }); \ No newline at end of file |