aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js')
-rwxr-xr-xjs/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js29
1 files changed, 20 insertions, 9 deletions
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
index dcb69255..599eeda3 100755
--- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
+++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js
@@ -159,15 +159,19 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
159 _loadComponents: { 159 _loadComponents: {
160 value: function() { 160 value: function() {
161 161
162 this.componentsToLoad = this.components.children[0].children.length; 162 for(var cat in this.components.children) {
163 163
164 for(var i = 0, component; component = this.components.children[0].children[i]; i++) { 164 this.componentsToLoad += this.components.children[cat].children.length;
165 var req = new XMLHttpRequest(); 165
166 //req.identifier = "searchRequest"; 166 for(var i = 0, component; component = this.components.children[cat].children[i]; i++) {
167 req.open("GET", component.dataFile); 167 var req = new XMLHttpRequest();
168 req.addEventListener("load", this, false); 168 //req.identifier = "searchRequest";
169 req.addEventListener("error", this, false); 169 req.open("GET", component.dataFile);
170 req.send(); 170 req.addEventListener("load", this, false);
171 req.addEventListener("error", this, false);
172 req.send();
173 }
174
171 } 175 }
172 } 176 }
173 }, 177 },
@@ -287,6 +291,13 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component
287 '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)' 291 '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)'
288 }; 292 };
289 293
294 var defaultStyles = component.defaultStyles;
295 if(defaultStyles) {
296 for(var n in defaultStyles) {
297 styles[n] = defaultStyles[n];
298 }
299 }
300
290 that.application.ninja.currentDocument.setComponentInstance(instance, element); 301 that.application.ninja.currentDocument.setComponentInstance(instance, element);
291 302
292 NJevent("elementAdding", {"el": element, "data":styles}); 303 NJevent("elementAdding", {"el": element, "data":styles});