aboutsummaryrefslogtreecommitdiff
path: root/js/document/models/html.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/models/html.js')
-rwxr-xr-xjs/document/models/html.js44
1 files changed, 41 insertions, 3 deletions
diff --git a/js/document/models/html.js b/js/document/models/html.js
index ff57454b..b57ff832 100755
--- a/js/document/models/html.js
+++ b/js/document/models/html.js
@@ -6,16 +6,54 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
6 6
7//////////////////////////////////////////////////////////////////////// 7////////////////////////////////////////////////////////////////////////
8// 8//
9var Montage = require("montage/core/core").Montage, 9var Montage = require("montage/core/core").Montage,
10 BaseDocumentModel = require("js/document/models/base").BaseDocumentModel; 10 BaseDocumentModel = require("js/document/models/base").BaseDocumentModel,
11 webGlDocumentHelper = require("js/document/helpers/webgl-helper").webGlDocumentHelper;
11//////////////////////////////////////////////////////////////////////// 12////////////////////////////////////////////////////////////////////////
12// 13//
13exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { 14exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, {
14 //////////////////////////////////////////////////////////////////// 15 ////////////////////////////////////////////////////////////////////
15 // 16 //
16 hasTemplate: { 17 hasTemplate: {
17 enumerable: false,
18 value: false 18 value: false
19 },
20 ////////////////////////////////////////////////////////////////////
21 //
22 draw3DGrid: {
23 value: false
24 },
25 ////////////////////////////////////////////////////////////////////
26 //
27 baseHref: {
28 value: null
29 },
30 ////////////////////////////////////////////////////////////////////
31 //
32 webGlHelper: {
33 value: webGlDocumentHelper
34 },
35 ////////////////////////////////////////////////////////////////////
36 //
37 userComponents: {
38 value: {}
39 },
40 ////////////////////////////////////////////////////////////////////
41 //Add a reference to a component instance to the userComponents hash using the element UUID
42 setComponentInstance: {
43 value: function(instance, el) {
44 this.userComponents[el.uuid] = instance;
45 }
46 },
47 ////////////////////////////////////////////////////////////////////
48 //Returns the component instance obj from the element
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 }
19 } 57 }
20 //////////////////////////////////////////////////////////////////// 58 ////////////////////////////////////////////////////////////////////
21 //////////////////////////////////////////////////////////////////// 59 ////////////////////////////////////////////////////////////////////