diff options
Diffstat (limited to 'js/document/views')
-rwxr-xr-x | js/document/views/design.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js index 1a5b071e..dad6de8b 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -442,15 +442,18 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
442 | value: function (scripttags) { | 442 | value: function (scripttags) { |
443 | var self = this; | 443 | var self = this; |
444 | // | 444 | // |
445 | //debugger; | ||
445 | this.iframe.contentWindow.document.body.addEventListener('mjsTemplateReady', function () { | 446 | this.iframe.contentWindow.document.body.addEventListener('mjsTemplateReady', function () { |
446 | //Initializing template with user's seriliazation | 447 | //Initializing template with user's seriliazation |
447 | var template = this.iframe.contentWindow.mjsTemplate.create(); | 448 | var template = this.iframe.contentWindow.mjsTemplate.create(); |
449 | |||
448 | template.initWithDocument(this.iframe.contentWindow.document); | 450 | template.initWithDocument(this.iframe.contentWindow.document); |
449 | template.instantiateWithOwnerAndDocument(null, this.iframe.contentWindow.document, function (){ | 451 | template.instantiateWithOwnerAndDocument(null, this.iframe.contentWindow.document, function (){ |
450 | //TODO: Verify this is properly done, seems like a hack | 452 | //TODO: Verify this is properly done, seems like a hack |
451 | for (var c in template._deserializer._objects) { | 453 | for (var c in template._deserializer._objects) { |
452 | //Forcing draw on components | 454 | //Forcing draw on components |
453 | template._deserializer._objects[c].needsDraw = true; | 455 | template._deserializer._objects[c].needsDraw = true; |
456 | //this.model.objects = template.deserializer.getObjectsFromLastDeserialization(); | ||
454 | } | 457 | } |
455 | 458 | ||
456 | // Now call the view callback | 459 | // Now call the view callback |