aboutsummaryrefslogtreecommitdiff
path: root/js/document/views
diff options
context:
space:
mode:
authorKruti Shah2012-06-27 09:25:42 -0700
committerKruti Shah2012-06-27 09:25:42 -0700
commitd6bffa2450f68bdf9bfff0f4e155778f59f3624a (patch)
treec37300f67a3fb502d7f4e277600944739d48fd82 /js/document/views
parentb52747edbeba7d210fca98acccb2d2df52134bca (diff)
parent46174eb0ce93d660c8d2e9276fbdc4f9a03f056a (diff)
downloadninja-d6bffa2450f68bdf9bfff0f4e155778f59f3624a.tar.gz
Merge branch 'refs/heads/ninjainternalmaster' into Timeline-local-kruti
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 });