aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
Diffstat (limited to 'js/components')
-rwxr-xr-xjs/components/checkbox.reel/checkbox.js21
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.js4
2 files changed, 23 insertions, 2 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;
diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.js b/js/components/tools-properties/rect-properties.reel/rect-properties.js
index b4085eea..f023f4bb 100755
--- a/js/components/tools-properties/rect-properties.reel/rect-properties.js
+++ b/js/components/tools-properties/rect-properties.reel/rect-properties.js
@@ -33,9 +33,9 @@ exports.RectProperties = Montage.create(ToolProperties, {
33 this.TRRadiusControl.enabled = this.BLRadiusControl.enabled = this.BRRadiusControl.enabled = !this.lockButton.pressed; 33 this.TRRadiusControl.enabled = this.BLRadiusControl.enabled = this.BRRadiusControl.enabled = !this.lockButton.pressed;
34 34
35 if(this.lockButton.pressed) { 35 if(this.lockButton.pressed) {
36 this._removeBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]);
37 } else {
38 this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); 36 this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]);
37 } else {
38 this._removeBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]);
39 } 39 }
40 40
41 } 41 }