diff options
-rw-r--r-- | js/data/panels-data.js | 25 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.html | 2 | ||||
-rwxr-xr-x | js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | 2 | ||||
-rwxr-xr-x | js/panels/Panel.reel/Panel.js | 100 | ||||
-rwxr-xr-x | js/panels/PanelContainer.reel/PanelContainer.html | 110 | ||||
-rwxr-xr-x | js/panels/PanelContainer.reel/PanelContainer.js (renamed from js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js) | 75 | ||||
-rwxr-xr-x | js/panels/PanelContainer/PanelContainer.reel/PanelContainer.html | 146 | ||||
-rw-r--r-- | js/panels/drag-drop-composer.js | 2 |
8 files changed, 219 insertions, 243 deletions
diff --git a/js/data/panels-data.js b/js/data/panels-data.js index aa5057a2..2422f5e7 100644 --- a/js/data/panels-data.js +++ b/js/data/panels-data.js | |||
@@ -19,7 +19,6 @@ exports.PanelsData = Montage.create(Montage, { | |||
19 | scrollable: false, | 19 | scrollable: false, |
20 | collapsed: false, | 20 | collapsed: false, |
21 | open: true, | 21 | open: true, |
22 | contentComponent: null, | ||
23 | modulePath: "js/panels/Color/colorpanelbase.reel", | 22 | modulePath: "js/panels/Color/colorpanelbase.reel", |
24 | moduleName: "ColorPanelBase" | 23 | moduleName: "ColorPanelBase" |
25 | }, | 24 | }, |
@@ -32,7 +31,6 @@ exports.PanelsData = Montage.create(Montage, { | |||
32 | scrollable: true, | 31 | scrollable: true, |
33 | collapsed: false, | 32 | collapsed: false, |
34 | open: true, | 33 | open: true, |
35 | contentComponent: null, | ||
36 | modulePath: "js/panels/properties.reel", | 34 | modulePath: "js/panels/properties.reel", |
37 | moduleName: "Properties" | 35 | moduleName: "Properties" |
38 | }, | 36 | }, |
@@ -45,7 +43,6 @@ exports.PanelsData = Montage.create(Montage, { | |||
45 | collapsed: true, | 43 | collapsed: true, |
46 | scrollable: true, | 44 | scrollable: true, |
47 | open: true, | 45 | open: true, |
48 | contentComponent: null, | ||
49 | modulePath: "js/panels/Materials/materials-library-panel.reel", | 46 | modulePath: "js/panels/Materials/materials-library-panel.reel", |
50 | moduleName: "MaterialsLibraryPanel" | 47 | moduleName: "MaterialsLibraryPanel" |
51 | }, | 48 | }, |
@@ -58,7 +55,6 @@ exports.PanelsData = Montage.create(Montage, { | |||
58 | scrollable: true, | 55 | scrollable: true, |
59 | collapsed: true, | 56 | collapsed: true, |
60 | open: true, | 57 | open: true, |
61 | contentComponent: null, | ||
62 | modulePath: "js/panels/Components/ComponentsPanelBase.reel", | 58 | modulePath: "js/panels/Components/ComponentsPanelBase.reel", |
63 | moduleName: "ComponentsPanelBase" | 59 | moduleName: "ComponentsPanelBase" |
64 | }, | 60 | }, |
@@ -71,7 +67,6 @@ exports.PanelsData = Montage.create(Montage, { | |||
71 | // scrollable: true, | 67 | // scrollable: true, |
72 | // collapsed: false, | 68 | // collapsed: false, |
73 | // open: true, | 69 | // open: true, |
74 | // content: null, | ||
75 | // modulePath: "js/panels/Project/projectpanelbase.reel", | 70 | // modulePath: "js/panels/Project/projectpanelbase.reel", |
76 | // moduleName: "ProjectPanelBase" | 71 | // moduleName: "ProjectPanelBase" |
77 | // }, | 72 | // }, |
@@ -84,7 +79,6 @@ exports.PanelsData = Montage.create(Montage, { | |||
84 | scrollable: true, | 79 | scrollable: true, |
85 | collapsed: true, | 80 | collapsed: true, |
86 | open: true, | 81 | open: true, |
87 | contentComponent: null, | ||
88 | modulePath: "js/panels/CSSPanel/CSSPanelBase.reel", | 82 | modulePath: "js/panels/CSSPanel/CSSPanelBase.reel", |
89 | moduleName: "CSSPanelBase" | 83 | moduleName: "CSSPanelBase" |
90 | }, | 84 | }, |
@@ -97,7 +91,6 @@ exports.PanelsData = Montage.create(Montage, { | |||
97 | collapsed: true, | 91 | collapsed: true, |
98 | scrollable: true, | 92 | scrollable: true, |
99 | open: true, | 93 | open: true, |
100 | contentComponent: null, | ||
101 | modulePath: "js/panels/presets/content.reel", | 94 | modulePath: "js/panels/presets/content.reel", |
102 | moduleName: "content" | 95 | moduleName: "content" |
103 | } | 96 | } |
@@ -118,24 +111,6 @@ exports.PanelsData = Montage.create(Montage, { | |||
118 | this._panelOrder = val; | 111 | this._panelOrder = val; |
119 | } | 112 | } |
120 | } | 113 | } |
121 | |||
122 | |||
123 | panels: { | ||
124 | get: function() { | ||
125 | var filtered = this._panels.filter(function(item) { | ||
126 | return item.open; | ||
127 | }); | ||
128 | |||
129 | filtered.sort(function(a,b) { | ||
130 | a.name | ||
131 | }); | ||
132 | |||
133 | return filtered; | ||
134 | }, | ||
135 | set : function() { | ||
136 | |||
137 | } | ||
138 | } | ||
139 | */ | 114 | */ |
140 | 115 | ||
141 | }); \ No newline at end of file | 116 | }); \ No newline at end of file |
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index cdf53ddf..8f6f6d7b 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html | |||
@@ -166,7 +166,7 @@ | |||
166 | }, | 166 | }, |
167 | 167 | ||
168 | "panelContainer": { | 168 | "panelContainer": { |
169 | "module": "js/panels/PanelContainer/PanelContainer.reel", | 169 | "module": "js/panels/PanelContainer.reel", |
170 | "name": "PanelContainer", | 170 | "name": "PanelContainer", |
171 | "properties": { | 171 | "properties": { |
172 | "element": {"#": "rightPanelContent"}, | 172 | "element": {"#": "rightPanelContent"}, |
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js index b4eec771..b6bee37d 100755 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | |||
@@ -118,7 +118,7 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component | |||
118 | didCreate: { | 118 | didCreate: { |
119 | value: function() { | 119 | value: function() { |
120 | // Setup the drop delegate | 120 | // Setup the drop delegate |
121 | this.application.ninja.dragDropMediator.dropDelegate = this; | 121 | // this.application.ninja.dragDropMediator.dropDelegate = this; |
122 | // Loop through the component and load the JSON data for them | 122 | // Loop through the component and load the JSON data for them |
123 | this._loadComponents(); | 123 | this._loadComponents(); |
124 | } | 124 | } |
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index e0bf3f18..2b308258 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js | |||
@@ -9,31 +9,52 @@ var Component = require("montage/ui/component").Component; | |||
9 | 9 | ||
10 | exports.Panel = Montage.create(Component, { | 10 | exports.Panel = Montage.create(Component, { |
11 | 11 | ||
12 | name: { value: "Panel" }, | 12 | name: { |
13 | collapsedHeight: {value: 26}, | 13 | value: "Panel" |
14 | _collapsed: {value: false}, | 14 | }, |
15 | _height: { value: 200 }, | 15 | |
16 | minHeight: {value: 200 }, | 16 | _collapsed: { |
17 | maxHeight: { value: null}, | 17 | value: false |
18 | flexible: {value: true}, | 18 | }, |
19 | _locked: { value: false}, | 19 | |
20 | isResizing: {value: false }, | 20 | _height: { |
21 | resizer: {value: null }, | 21 | value: 200 |
22 | modulePath: {value: null}, | 22 | }, |
23 | moduleName: {value: null}, | 23 | |
24 | _contentComponent: {value: null}, | 24 | minHeight: { |
25 | 25 | value: 200 | |
26 | contentComponent: { | 26 | }, |
27 | get: function() { | 27 | |
28 | return this._contentComponent; | 28 | maxHeight: { |
29 | }, | 29 | value: null |
30 | set: function(val) { | 30 | }, |
31 | if (val !== null && val !== this._contentComponent) { | 31 | |
32 | this.panelContent.content = val; | 32 | flexible: { |
33 | this.panelContent.needsDraw = true; | 33 | value: true |
34 | this._contentComponent = val; | 34 | }, |
35 | } | 35 | |
36 | } | 36 | _locked: { |
37 | value: false | ||
38 | }, | ||
39 | |||
40 | isResizing: { | ||
41 | value: false | ||
42 | }, | ||
43 | |||
44 | _resizedHeight: { | ||
45 | value: 0 | ||
46 | }, | ||
47 | |||
48 | resizer: { | ||
49 | value: null | ||
50 | }, | ||
51 | |||
52 | modulePath: { | ||
53 | value: null | ||
54 | }, | ||
55 | |||
56 | moduleName: { | ||
57 | value: null | ||
37 | }, | 58 | }, |
38 | 59 | ||
39 | collapsed: { | 60 | collapsed: { |
@@ -63,10 +84,6 @@ exports.Panel = Montage.create(Component, { | |||
63 | } | 84 | } |
64 | }, | 85 | }, |
65 | 86 | ||
66 | _resizedHeight: { | ||
67 | value: 0 | ||
68 | }, | ||
69 | |||
70 | locked: { | 87 | locked: { |
71 | get: function() { | 88 | get: function() { |
72 | return this._locked; | 89 | return this._locked; |
@@ -94,17 +111,20 @@ exports.Panel = Montage.create(Component, { | |||
94 | 111 | ||
95 | prepareForDraw: { | 112 | prepareForDraw: { |
96 | value: function() { | 113 | value: function() { |
97 | //TODO: This line should not be here this line hits each time a panel is loaded. Will Need to move to instance call; | 114 | if(this.name === "Color") { |
98 | this.application.ninja.colorController.colorView = this.application.ninja.colorController.colorPanelBase.create(); | 115 | this.application.ninja.colorController.colorView = this.application.ninja.colorController.colorPanelBase.create(); |
99 | var myContent; | 116 | } |
100 | var that = this; | 117 | |
101 | 118 | if(this.modulePath && this.moduleName) { | |
102 | myContent = require.async(this.modulePath) | 119 | // Load the slot content |
103 | .then(function(panelContent) { | 120 | var that = this; |
104 | var componentRequire = panelContent[that.moduleName]; | 121 | require.async(this.modulePath) |
105 | that.contentComponent = componentRequire.create(); | 122 | .then(function(panelContent) { |
106 | }) | 123 | var componentRequire = panelContent[that.moduleName]; |
107 | .end(); |