diff options
author | Valerio Virgillito | 2012-06-05 21:40:44 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-05 21:40:44 -0700 |
commit | e28eb9158a50d7e6d97dbc68066e591ac600c241 (patch) | |
tree | 1615affe62374ae67eaecb8b1966a2f464559dfa /js/document/models | |
parent | d7555c35b357e28a1e1ccc1c4edc4fe04d2b139a (diff) | |
download | ninja-e28eb9158a50d7e6d97dbc68066e591ac600c241.tar.gz |
removing all model creators.
The elementModel is now a getter that will create a new model when needed.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/document/models')
-rwxr-xr-x | js/document/models/html.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/js/document/models/html.js b/js/document/models/html.js index 9aa0d27e..a367f95f 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js | |||
@@ -64,31 +64,8 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { | |||
64 | }, | 64 | }, |
65 | //////////////////////////////////////////////////////////////////// | 65 | //////////////////////////////////////////////////////////////////// |
66 | // | 66 | // |
67 | userComponents: { | ||
68 | value: {} | ||
69 | }, | ||
70 | //////////////////////////////////////////////////////////////////// | ||
71 | // | ||
72 | documentRoot: { | 67 | documentRoot: { |
73 | value: null | 68 | value: null |
74 | }, | ||
75 | //////////////////////////////////////////////////////////////////// | ||
76 | //Add a reference to a component instance to the userComponents hash using the element UUID | ||
77 | setComponentInstance: { | ||
78 | value: function(instance, el) { | ||
79 | this.userComponents[el.uuid] = instance; | ||
80 | } | ||
81 | }, | ||
82 | //////////////////////////////////////////////////////////////////// | ||
83 | //Returns the component instance obj from the element | ||
84 | getComponentFromElement: { | ||
85 | value: function(el) { | ||
86 | if(el) { | ||
87 | if(el.uuid) return this.userComponents[el.uuid]; | ||
88 | } else { | ||
89 | return null; | ||
90 | } | ||
91 | } | ||
92 | } | 69 | } |
93 | //////////////////////////////////////////////////////////////////// | 70 | //////////////////////////////////////////////////////////////////// |
94 | //////////////////////////////////////////////////////////////////// | 71 | //////////////////////////////////////////////////////////////////// |