diff options
Diffstat (limited to 'js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js')
-rwxr-xr-x | js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js | 74 |
1 files changed, 74 insertions, 0 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 new file mode 100755 index 00000000..18eb11c9 --- /dev/null +++ b/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js | |||
@@ -0,0 +1,74 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | |||
7 | /** | ||
8 | @requires montage/core/core | ||
9 | @requires montage/ui/component | ||
10 | */ | ||
11 | var Montage = require("montage/core/core").Montage, | ||
12 | Component = require("montage/ui/component").Component; | ||
13 | |||
14 | exports.BindingHudOption = Montage.create(Component, { | ||
15 | _title: { | ||
16 | value: null | ||
17 | }, | ||
18 | |||
19 | title: { | ||
20 | get: function() { | ||
21 | return this._title; | ||
22 | }, | ||
23 | set: function(val) { | ||
24 | this._title = val; | ||
25 | this.needsDraw = true; | ||
26 | } | ||
27 | }, | ||
28 | |||
29 | bound: { | ||
30 | value: false | ||
31 | }, | ||
32 | |||
33 | _hudOptions: { | ||
34 | value: [] | ||
35 | }, | ||
36 | |||
37 | hudOptions: { | ||
38 | get: function() { | ||
39 | return this._hudOptions; | ||
40 | }, | ||
41 | set: function(val) { | ||
42 | if (typeof(val) !== "undefined") { | ||
43 | this._hudOptions = val; | ||
44 | this.title = val.title; | ||
45 | this.bound = val.bound; | ||
46 | } else { | ||
47 | this._hudOptions = null; | ||
48 | } | ||
49 | this.needsDraw = true; | ||
50 | |||
51 | } | ||
52 | }, | ||
53 | |||
54 | prepareForDraw: { | ||
55 | value: function() { | ||
56 | // Set Up Listener for click and propagate up to Binding View | ||
57 | } | ||
58 | }, | ||
59 | |||
60 | draw: { | ||
61 | value:function() { | ||
62 | if(this.bound) { | ||
63 | this.element.classList.add("bound"); | ||
64 | } else { | ||
65 | this.element.classList.remove("bound"); | ||
66 | } | ||
67 | // if(this.bindings.length > 0) { | ||
68 | // this.element.classList.add("bound"); | ||
69 | // } else { | ||
70 | // this.element.classList.remove("bound"); | ||
71 | // } | ||
72 | } | ||
73 | } | ||
74 | }); \ No newline at end of file | ||