diff options
author | Eric Guzman | 2012-05-17 17:43:05 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-17 17:43:05 -0700 |
commit | 458a4598ed64e3d8c6010a216fb7fb4b3c3c87e7 (patch) | |
tree | ee329e409fe28ae54c894b9e27e82e1f85aefc85 /js/document/models/html.js | |
parent | 82954f400f7f8609aef0d2bc1f44c9d960907be6 (diff) | |
parent | 52394cdd71bd62c8c109fd135fa146b7183fbd1f (diff) | |
download | ninja-458a4598ed64e3d8c6010a216fb7fb4b3c3c87e7.tar.gz |
Merge branch 'dom-architecture' of github.com:Motorola-Mobility/ninja-internal into CSSPanelUpdates
Conflicts:
js/document/templates/montage-html/default_html.css
js/lib/NJUtils.js
Diffstat (limited to 'js/document/models/html.js')
-rwxr-xr-x | js/document/models/html.js | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/js/document/models/html.js b/js/document/models/html.js index ff57454b..67457863 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js | |||
@@ -6,16 +6,59 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
6 | 6 | ||
7 | //////////////////////////////////////////////////////////////////////// | 7 | //////////////////////////////////////////////////////////////////////// |
8 | // | 8 | // |
9 | var Montage = require("montage/core/core").Montage, | 9 | var 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 | // |
13 | exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { | 14 | exports.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 | selection: { | ||
23 | value: [] | ||
24 | }, | ||
25 | //////////////////////////////////////////////////////////////////// | ||
26 | // | ||
27 | draw3DGrid: { | ||
28 | value: false | ||
29 | }, | ||
30 | //////////////////////////////////////////////////////////////////// | ||
31 | // | ||
32 | baseHref: { | ||
33 | value: null | ||
34 | }, | ||
35 | //////////////////////////////////////////////////////////////////// | ||
36 | // | ||
37 | webGlHelper: { | ||
38 | value: webGlDocumentHelper | ||
39 | }, | ||
40 | //////////////////////////////////////////////////////////////////// | ||
41 | // | ||
42 | userComponents: { | ||
43 | value: {} | ||
44 | }, | ||
45 | //////////////////////////////////////////////////////////////////// | ||
46 | //Add a reference to a component instance to the userComponents hash using the element UUID | ||
47 | setComponentInstance: { | ||
48 | value: function(instance, el) { | ||
49 | this.userComponents[el.uuid] = instance; | ||
50 | } | ||
51 | }, | ||
52 | //////////////////////////////////////////////////////////////////// | ||
53 | //Returns the component instance obj from the element | ||
54 | getComponentFromElement: { | ||
55 | value: function(el) { | ||
56 | if(el) { | ||
57 | if(el.uuid) return this.userComponents[el.uuid]; | ||
58 | } else { | ||
59 | return null; | ||
60 | } | ||
61 | } | ||
19 | } | 62 | } |
20 | //////////////////////////////////////////////////////////////////// | 63 | //////////////////////////////////////////////////////////////////// |
21 | //////////////////////////////////////////////////////////////////// | 64 | //////////////////////////////////////////////////////////////////// |