aboutsummaryrefslogtreecommitdiff
path: root/js/document/models
diff options
context:
space:
mode:
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