diff options
Diffstat (limited to 'js/controllers')
-rw-r--r-- | js/controllers/elements/component-controller.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/js/controllers/elements/component-controller.js b/js/controllers/elements/component-controller.js index 458e6b46..7a8acb3a 100644 --- a/js/controllers/elements/component-controller.js +++ b/js/controllers/elements/component-controller.js | |||
@@ -9,4 +9,27 @@ var Montage = require("montage/core/core").Montage, | |||
9 | 9 | ||
10 | exports.ComponentController = Montage.create(ElementController, { | 10 | exports.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 | default: | ||
19 | return ElementController.getProperty(el, prop); | ||
20 | } | ||
21 | } | ||
22 | }, | ||
23 | |||
24 | setProperty: { | ||
25 | value: function(el, p, value) { | ||
26 | switch(p) { | ||
27 | case "label": | ||
28 | this.application.ninja.currentDocument.getComponentFromElement(el).label = value; | ||
29 | break; | ||
30 | default: | ||
31 | ElementController.setProperty(el, p, value); | ||
32 | } | ||
33 | } | ||
34 | } | ||
12 | }); | 35 | }); |