aboutsummaryrefslogtreecommitdiff
path: root/js/document/views
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-26 13:40:44 -0700
committerJose Antonio Marquez2012-06-26 13:40:44 -0700
commit81747f839bf5d176a15511303f7d2a0e4028e5bb (patch)
tree5afab7fb834f9df27d2bf35f6414a906c27ec598 /js/document/views
parent9ebf80d943b894242d90cf62bc3078c6a83041ad (diff)
parent87a8b62f71bb72274c3dd1fa389e88c12d482ebb (diff)
downloadninja-81747f839bf5d176a15511303f7d2a0e4028e5bb.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into Color
Diffstat (limited to 'js/document/views')
-rwxr-xr-xjs/document/views/design.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js
index d5c5c6c4..6a60e1f9 100755
--- a/js/document/views/design.js
+++ b/js/document/views/design.js
@@ -461,21 +461,25 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
461 initMontage: { 461 initMontage: {
462 value: function (scripttags) { 462 value: function (scripttags) {
463 var self = this; 463 var self = this;
464 // 464
465 this.iframe.contentWindow.document.body.addEventListener('mjsTemplateReady', function () { 465 this.iframe.contentWindow.document.body.addEventListener('mjsTemplateReady', function () {
466 //Initializing template with user's seriliazation 466 //Initializing template with user's seriliazation
467 var template = this.iframe.contentWindow.mjsTemplate.create(); 467 var template = this.iframe.contentWindow.mjsTemplate.create();
468
468 template.initWithDocument(this.iframe.contentWindow.document); 469 template.initWithDocument(this.iframe.contentWindow.document);
469 template.instantiateWithOwnerAndDocument(null, this.iframe.contentWindow.document, function (){ 470 template.instantiateWithOwnerAndDocument(null, this.iframe.contentWindow.document, function (){
470 //TODO: Verify this is properly done, seems like a hack 471 //TODO: Verify this is properly done, seems like a hack
472
473 var objArray = [];
471 for (var c in template._deserializer._objects) { 474 for (var c in template._deserializer._objects) {
472 //Forcing draw on components 475 //Forcing draw on components
473 template._deserializer._objects[c].needsDraw = true; 476 template._deserializer._objects[c].needsDraw = true;
477 objArray.push(template._deserializer._objects[c]);
474 } 478 }
475 479
476 // Now call the view callback 480 // Now call the view callback
477 if(self._viewCallback) { 481 if(self._viewCallback) {
478 self._viewCallback.viewCallback.call(self._viewCallback.context); 482 self._viewCallback.viewCallback.call(self._viewCallback.context, objArray);
479 } 483 }
480 484
481 }); 485 });