From e28eb9158a50d7e6d97dbc68066e591ac600c241 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 5 Jun 2012 21:40:44 -0700 Subject: removing all model creators. The elementModel is now a getter that will create a new model when needed. Signed-off-by: Valerio Virgillito --- js/document/models/html.js | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'js/document/models/html.js') 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 @@ -62,33 +62,10 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { webGlHelper: { value: null }, - //////////////////////////////////////////////////////////////////// - // - userComponents: { - value: {} - }, //////////////////////////////////////////////////////////////////// // documentRoot: { value: null - }, - //////////////////////////////////////////////////////////////////// - //Add a reference to a component instance to the userComponents hash using the element UUID - setComponentInstance: { - value: function(instance, el) { - this.userComponents[el.uuid] = instance; - } - }, - //////////////////////////////////////////////////////////////////// - //Returns the component instance obj from the element - getComponentFromElement: { - value: function(el) { - if(el) { - if(el.uuid) return this.userComponents[el.uuid]; - } else { - return null; - } - } } //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 6a0f150f49be656e0725bc77b452a3141dddd47c Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 6 Jun 2012 13:46:02 -0700 Subject: Cleaning up Removed reference of model in design view, clean up slightly, need to implement binding later. --- js/document/models/html.js | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'js/document/models/html.js') diff --git a/js/document/models/html.js b/js/document/models/html.js index 9aa0d27e..0f88229d 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js @@ -40,22 +40,32 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { scrollLeft: { value: null }, - + //////////////////////////////////////////////////////////////////// + // scrollTop: { value: null }, - + //////////////////////////////////////////////////////////////////// + // userContentLeft: { value: null }, - + //////////////////////////////////////////////////////////////////// + // userContentTop: { value: null }, //////////////////////////////////////////////////////////////////// - // + //TODO: Convert to bindings + documentRoot: { + get: function() {return this.views.design._documentRoot;}, + set: function(value) {this.views.design._documentRoot = value;} + }, + //////////////////////////////////////////////////////////////////// + //TODO: Convert to bindings baseHref: { - value: null + get: function() {return this.views.design._baseHref;}, + set: function(value) {this.views.design._baseHref = value;} }, //////////////////////////////////////////////////////////////////// // @@ -66,11 +76,6 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { // userComponents: { value: {} - }, - //////////////////////////////////////////////////////////////////// - // - documentRoot: { - value: null }, //////////////////////////////////////////////////////////////////// //Add a reference to a component instance to the userComponents hash using the element UUID -- cgit v1.2.3 From 8da49b093e01a62c5b2009da075c2ccd2b1b6f5a Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 7 Jun 2012 14:39:12 -0700 Subject: Fixing unique ID store --- js/document/models/html.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/document/models/html.js') diff --git a/js/document/models/html.js b/js/document/models/html.js index 6bdc6546..7064c6e3 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js @@ -23,6 +23,8 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { value:function() { //Creating instance of the webGL helper for this model this.webGlHelper = webGlDocumentHelper.create(); + // + this.libs = {montage: false, canvas: false, montageId: null, canvasId: null}; } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3