diff options
author | Nivesh Rajbhandari | 2012-05-09 18:13:07 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-05-09 18:13:07 -0700 |
commit | 454ba956b0d6f48d37a5ad3f50eb00aaaaa7271b (patch) | |
tree | b3826880c843435cdaf2d8981400909127466313 /js/document/models | |
parent | 9ff89d41048d056ddab4c15b4e9e74bc5417c883 (diff) | |
parent | 2e9a6b271439d934439514f6386424567853f93c (diff) | |
download | ninja-454ba956b0d6f48d37a5ad3f50eb00aaaaa7271b.tar.gz |
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Diffstat (limited to 'js/document/models')
-rwxr-xr-x | js/document/models/html.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/js/document/models/html.js b/js/document/models/html.js index 1639a8e2..b57ff832 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js | |||
@@ -24,8 +24,36 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { | |||
24 | }, | 24 | }, |
25 | //////////////////////////////////////////////////////////////////// | 25 | //////////////////////////////////////////////////////////////////// |
26 | // | 26 | // |
27 | baseHref: { | ||
28 | value: null | ||
29 | }, | ||
30 | //////////////////////////////////////////////////////////////////// | ||
31 | // | ||
27 | webGlHelper: { | 32 | webGlHelper: { |
28 | value: webGlDocumentHelper | 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 | } | ||
29 | } | 57 | } |
30 | //////////////////////////////////////////////////////////////////// | 58 | //////////////////////////////////////////////////////////////////// |
31 | //////////////////////////////////////////////////////////////////// | 59 | //////////////////////////////////////////////////////////////////// |