aboutsummaryrefslogtreecommitdiff
path: root/js/document/views
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-26 13:15:26 -0700
committerValerio Virgillito2012-06-26 13:15:26 -0700
commit87a8b62f71bb72274c3dd1fa389e88c12d482ebb (patch)
treebf9f995e2972c0a61355f24e64231cdf0b2c86b5 /js/document/views
parent8821e662484aedb027e26a873883e6ca3fb55a51 (diff)
parenta95bba25c3ba6e31784a452e9b94748cc870ba5d (diff)
downloadninja-87a8b62f71bb72274c3dd1fa389e88c12d482ebb.tar.gz
Merge pull request #323 from dhg637/binding
Binding View - Binding Tool & Binding Panel
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 });