diff options
author | Armen Kesablyan | 2012-06-11 13:25:13 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-11 13:25:13 -0700 |
commit | 337efc667372326ae2f9984d89a47bb151016774 (patch) | |
tree | 717f5a03f398cbab3b61f221458ed11f6b9db228 /js/document | |
parent | 278769df00ced8620fd73371e38fe2e43f07ca3b (diff) | |
download | ninja-337efc667372326ae2f9984d89a47bb151016774.tar.gz |
Changes Made to Object Listing of iFrame
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/document-html.js | 3 | ||||
-rwxr-xr-x | js/document/models/base.js | 13 | ||||
-rwxr-xr-x | js/document/models/html.js | 3 | ||||
-rwxr-xr-x | js/document/views/design.js | 6 |
4 files changed, 21 insertions, 4 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index 04565753..8b82c40f 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -106,7 +106,8 @@ exports.HtmlDocument = Montage.create(Component, { | |||
106 | } | 106 | } |
107 | }, | 107 | }, |
108 | handleViewReady: { | 108 | handleViewReady: { |
109 | value: function() { | 109 | value: function(mObjects) { |
110 | this.model.mObjects = mObjects; | ||
110 | //Making callback after view is loaded | 111 | //Making callback after view is loaded |
111 | this.loaded.callback.call(this.loaded.context, this); | 112 | this.loaded.callback.call(this.loaded.context, this); |
112 | } | 113 | } |
diff --git a/js/document/models/base.js b/js/document/models/base.js index 5fa06259..9c26bd2a 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js | |||
@@ -91,6 +91,19 @@ exports.BaseDocumentModel = Montage.create(Component, { | |||
91 | libs: { | 91 | libs: { |
92 | value: null | 92 | value: null |
93 | }, | 93 | }, |
94 | |||
95 | _mObjects: { | ||
96 | value: [] | ||
97 | }, | ||
98 | |||
99 | mObjects: { | ||
100 | get: function() { | ||
101 | return this._mObjects; | ||
102 | }, | ||
103 | set: function(value) { | ||
104 | this._mObjects = value; | ||
105 | } | ||
106 | }, | ||
94 | //////////////////////////////////////////////////////////////////// | 107 | //////////////////////////////////////////////////////////////////// |
95 | // | 108 | // |
96 | switchViewTo: { | 109 | switchViewTo: { |
diff --git a/js/document/models/html.js b/js/document/models/html.js index 7064c6e3..f65cd8c3 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js | |||
@@ -73,9 +73,10 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { | |||
73 | // | 73 | // |
74 | webGlHelper: { | 74 | webGlHelper: { |
75 | value: null | 75 | value: null |
76 | }, | 76 | } |
77 | //////////////////////////////////////////////////////////////////// | 77 | //////////////////////////////////////////////////////////////////// |
78 | //////////////////////////////////////////////////////////////////// | 78 | //////////////////////////////////////////////////////////////////// |
79 | |||
79 | }); | 80 | }); |
80 | //////////////////////////////////////////////////////////////////////// | 81 | //////////////////////////////////////////////////////////////////////// |
81 | //////////////////////////////////////////////////////////////////////// \ No newline at end of file | 82 | //////////////////////////////////////////////////////////////////////// \ No newline at end of file |
diff --git a/js/document/views/design.js b/js/document/views/design.js index dad6de8b..4484167a 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -450,15 +450,17 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
450 | template.initWithDocument(this.iframe.contentWindow.document); | 450 | template.initWithDocument(this.iframe.contentWindow.document); |
451 | template.instantiateWithOwnerAndDocument(null, this.iframe.contentWindow.document, function (){ | 451 | template.instantiateWithOwnerAndDocument(null, this.iframe.contentWindow.document, function (){ |
452 | //TODO: Verify this is properly done, seems like a hack | 452 | //TODO: Verify this is properly done, seems like a hack |
453 | |||
454 | var objArray = []; | ||
453 | for (var c in template._deserializer._objects) { | 455 | for (var c in template._deserializer._objects) { |
454 | //Forcing draw on components | 456 | //Forcing draw on components |
455 | template._deserializer._objects[c].needsDraw = true; | 457 | template._deserializer._objects[c].needsDraw = true; |
456 | //this.model.objects = template.deserializer.getObjectsFromLastDeserialization(); | 458 | objArray.push(template._deserializer._objects[c]); |
457 | } | 459 | } |
458 | 460 | ||
459 | // Now call the view callback | 461 | // Now call the view callback |
460 | if(self._viewCallback) { | 462 | if(self._viewCallback) { |
461 | self._viewCallback.viewCallback.call(self._viewCallback.context); | 463 | self._viewCallback.viewCallback.call(self._viewCallback.context, objArray); |
462 | } | 464 | } |
463 | 465 | ||
464 | }); | 466 | }); |