From e1fe603a7c002073f8ac13623f8cc8dc43efb59d Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 31 May 2012 10:27:46 -0700 Subject: fixing selection when switching documents Signed-off-by: Valerio Virgillito --- js/document/models/html.js | 5 ----- 1 file changed, 5 deletions(-) (limited to 'js/document/models/html.js') diff --git a/js/document/models/html.js b/js/document/models/html.js index fd42d4de..9f5599a2 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js @@ -19,11 +19,6 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { }, //////////////////////////////////////////////////////////////////// // - selection: { - value: [] - }, - //////////////////////////////////////////////////////////////////// - // selectionContainer: { value: [] }, -- cgit v1.2.3 From 94190d38d659b05a0f071e88134651c2484629f6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 1 Jun 2012 13:47:22 -0700 Subject: Fixing webGL helper --- js/document/models/html.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'js/document/models/html.js') diff --git a/js/document/models/html.js b/js/document/models/html.js index fd42d4de..0fe33990 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js @@ -17,6 +17,14 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { hasTemplate: { value: false }, + //////////////////////////////////////////////////////////////////// + //Called by the document immidiately after the model is created + init: { + value:function() { + //Creating instance of the webGL helper for this model + this.webGlHelper = webGlDocumentHelper.create(); + } + }, //////////////////////////////////////////////////////////////////// // selection: { @@ -57,7 +65,7 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { //////////////////////////////////////////////////////////////////// // webGlHelper: { - value: webGlDocumentHelper + value: null }, //////////////////////////////////////////////////////////////////// // -- cgit v1.2.3 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