aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-22 22:26:51 -0700
committerValerio Virgillito2012-03-22 22:26:51 -0700
commit388d8e469e4641553b67aece4fc1d56d9789fff5 (patch)
treed5b75fc0cfb47a714ba240dabbd48def1c6993f4 /js/components
parentf6afc520f357dec8daeb9b9e748f99c8d8508f7c (diff)
parentf2371c4a5a18a4dadb2e76f0275b90ac541e889d (diff)
downloadninja-388d8e469e4641553b67aece4fc1d56d9789fff5.tar.gz
Merge pull request #134 from mqg734/WebGL-Animation-CheckBox
Adding enabled/disabled support for PI"s checkbox controls, and using that capability for WebGL animate checkbox.
Diffstat (limited to 'js/components')
-rwxr-xr-xjs/components/checkbox.reel/checkbox.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/components/checkbox.reel/checkbox.js b/js/components/checkbox.reel/checkbox.js
index f06e5830..be331f4e 100755
--- a/js/components/checkbox.reel/checkbox.js
+++ b/js/components/checkbox.reel/checkbox.js
@@ -58,6 +58,26 @@ exports.Checkbox = Montage.create(Component, {
58 } 58 }
59 }, 59 },
60 60
61 _enabled: {
62 enumerable: false,
63 value: true
64 },
65
66 enabled: {
67 enumerable: true,
68 serializable: true,
69 get: function() {
70 return this._enabled;
71 },
72 set: function(value) {
73 if(value !== this._enabled)
74 {
75 this._enabled = value;
76 this.needsDraw = true;
77 }
78 }
79 },
80
61 handleChange: 81 handleChange:
62 { 82 {
63 value:function(event) 83 value:function(event)
@@ -76,6 +96,7 @@ exports.Checkbox = Montage.create(Component, {
76 96
77 draw: { 97 draw: {
78 value: function() { 98 value: function() {
99 this.element.disabled = !this._enabled;
79 if(!this._valueSyncedWithInputField) 100 if(!this._valueSyncedWithInputField)
80 { 101 {
81 this.element.checked = this._checked; 102 this.element.checked = this._checked;