aboutsummaryrefslogtreecommitdiff
path: root/js/document/models
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-09 15:40:50 -0700
committerValerio Virgillito2012-05-09 15:40:50 -0700
commit480c3c43f15162980390cf762411b93f7d02db19 (patch)
treeab406e791d71985a79d63c1bc6efb892f6483d8d /js/document/models
parentf8c467bd268e10d4f07136ca932c6eaffc94bc12 (diff)
downloadninja-480c3c43f15162980390cf762411b93f7d02db19.tar.gz
fixing the components for the new dom
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/document/models')
-rwxr-xr-xjs/document/models/html.js29
1 files changed, 28 insertions, 1 deletions
diff --git a/js/document/models/html.js b/js/document/models/html.js
index 1639a8e2..2764a6d6 100755
--- a/js/document/models/html.js
+++ b/js/document/models/html.js
@@ -26,9 +26,36 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, {
26 // 26 //
27 webGlHelper: { 27 webGlHelper: {
28 value: webGlDocumentHelper 28 value: webGlDocumentHelper
29 } 29 },
30 //////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////
31 //////////////////////////////////////////////////////////////////// 31 ////////////////////////////////////////////////////////////////////
32 userComponents: {
33 value: {}
34 },
35
36 /**
37 * Add a reference to a component instance to the userComponents hash using the
38 * element UUID
39 */
40 setComponentInstance: {
41 value: function(instance, el) {
42 this.userComponents[el.uuid] = instance;
43 }
44 },
45
46 /**
47 * Returns the component instance obj from the element
48 */
49 getComponentFromElement: {
50 value: function(el) {
51 if(el) {
52 if(el.uuid) return this.userComponents[el.uuid];
53 } else {
54 return null;
55 }
56 }
57 }
58
32}); 59});
33//////////////////////////////////////////////////////////////////////// 60////////////////////////////////////////////////////////////////////////
34//////////////////////////////////////////////////////////////////////// \ No newline at end of file 61//////////////////////////////////////////////////////////////////////// \ No newline at end of file