aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style.reel/style.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/css-panel/style.reel/style.js')
-rw-r--r--js/panels/css-panel/style.reel/style.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/panels/css-panel/style.reel/style.js b/js/panels/css-panel/style.reel/style.js
index 6860a97f..6ff102b2 100644
--- a/js/panels/css-panel/style.reel/style.js
+++ b/js/panels/css-panel/style.reel/style.js
@@ -8,12 +8,27 @@ var Montage = require("montage/core/core").Montage,
8 TreeNode = require("js/components/treeview/tree-node").TreeNode; 8 TreeNode = require("js/components/treeview/tree-node").TreeNode;
9 9
10exports.Style = Montage.create(TreeNode, { 10exports.Style = Montage.create(TreeNode, {
11 disabledClass : {
12 value: 'style-item-disabled'
13 },
11 propertyText : { 14 propertyText : {
12 value: "property" 15 value: "property"
13 }, 16 },
14 valueText : { 17 valueText : {
15 value: "value" 18 value: "value"
16 }, 19 },
20
21 _enabled : { value: true, distinct: true },
22 enabled : {
23 get: function() {
24 return this._enabled;
25 },
26 set: function(value) {
27 this._enabled = value;
28 this.needsDraw = true;
29 }
30 },
31
17 handleSourceObjectSet: { 32 handleSourceObjectSet: {
18 value: function() { 33 value: function() {
19 //debugger; 34 //debugger;
@@ -26,6 +41,7 @@ exports.Style = Montage.create(TreeNode, {
26 console.log("style - template did load"); 41 console.log("style - template did load");
27 } 42 }
28 }, 43 },
44
29 draw : { 45 draw : {
30 value : function() { 46 value : function() {
31 //debugger; 47 //debugger;
@@ -35,6 +51,12 @@ exports.Style = Montage.create(TreeNode, {
35 console.log("Label key unknown"); 51 console.log("Label key unknown");
36 } 52 }
37 53
54 if(this._enabled) {
55 this.element.classList.remove(this.disabledClass);
56 } else {
57 this.element.classList.add(this.disabledClass);
58 }
59
38 } 60 }
39 } 61 }
40}); \ No newline at end of file 62}); \ No newline at end of file