aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements')
-rw-r--r--js/controllers/elements/component-controller.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js
index 458e6b46..1b0591be 100644
--- a/js/controllers/elements/component-controller.js
+++ b/js/controllers/elements/component-controller.js
@@ -9,4 +9,33 @@ var Montage = require("montage/core/core").Montage,
9 9
10exports.ComponentController = Montage.create(ElementController, { 10exports.ComponentController = Montage.create(ElementController, {
11 11
12 getProperty: {
13 value: function(el, prop) {
14 switch(prop) {
15 case "label":
16 return this.application.ninja.currentDocument.getComponentFromElement(el).label;
17 break;
18 case "enabled":
19 return this.application.ninja.currentDocument.getComponentFromElement(el).enabled;
20 break;
21 default:
22 return ElementController.getProperty(el, prop, true);
23 }
24 }
25 },
26
27 setProperty: {
28 value: function(el, p, value) {
29 switch(p) {
30 case "label":
31 this.application.ninja.currentDocument.getComponentFromElement(el).label = value;
32 break;
33 case "enabled":
34 this.application.ninja.currentDocument.getComponentFromElement(el).enabled = value;
35 break;
36 default:
37 ElementController.setProperty(el, p, value);
38 }
39 }
40 }
12}); 41});