diff options
Diffstat (limited to 'js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js')
-rw-r--r-- | js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js index 58a798d8..9b5b755c 100644 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | |||
@@ -11,10 +11,25 @@ var Montage = require("montage/core/core").Montage, | |||
11 | var treeControlModule = require("js/components/tree.reel"); | 11 | var treeControlModule = require("js/components/tree.reel"); |
12 | 12 | ||
13 | var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component, { | 13 | var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component, { |
14 | _hasFocus: { | 14 | |
15 | enumerable: false, | 15 | components: { |
16 | value: false | 16 | value: null |
17 | }, | ||
18 | |||
19 | didCreate: { | ||
20 | value: function() { | ||
21 | this._loadComponents(); | ||
22 | } | ||
23 | }, | ||
24 | |||
25 | _loadComponents: { | ||
26 | value: function() { | ||
27 | this.photos = [ | ||
28 | {component: "Button", data: "montage/ui/button.reel/button.json"} | ||
29 | ]; | ||
30 | } | ||
17 | }, | 31 | }, |
32 | |||
18 | prepareForDraw: { | 33 | prepareForDraw: { |
19 | enumerable: false, | 34 | enumerable: false, |
20 | value: function() { | 35 | value: function() { |
@@ -57,7 +72,7 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component | |||
57 | componentEl.setAttribute("type", "button"); | 72 | componentEl.setAttribute("type", "button"); |
58 | //componentEl.innerHTML = "Button"; | 73 | //componentEl.innerHTML = "Button"; |
59 | 74 | ||
60 | componentInstance = this.application.ninja.currentDocument._window.addComponent(componentEl, {type: componentType, path: "montage/ui/button.reel", name: "Button"}); | 75 | componentInstance = this.application.ninja.currentDocument._window.addComponent(componentEl, {type: componentType, path: "montage/ui/button.reel", name: "Button"}, this.callback); |
61 | 76 | ||
62 | 77 | ||
63 | }else if(componentType == "Checkbox"){ | 78 | }else if(componentType == "Checkbox"){ |
@@ -140,5 +155,11 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component | |||
140 | 155 | ||
141 | 156 | ||
142 | } | 157 | } |
158 | }, | ||
159 | |||
160 | callback: { | ||
161 | value: function() { | ||
162 | console.log("the callback"); | ||
163 | } | ||
143 | } | 164 | } |
144 | }); \ No newline at end of file | 165 | }); \ No newline at end of file |