From 66632a6e0de0998ff6d36abdaa8c3a546eada0f5 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 30 May 2012 23:02:46 -0700 Subject: fixing the closing of documents Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index c60a12a2..377c305a 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -99,6 +99,8 @@ exports.HtmlDocument = Montage.create(Component, { //Removing observer, only needed on initial load this._observer.disconnect(); this._observer = null; + //Show the view + this.model.currentView.show(); //Making callback after view is loaded this.loaded.callback.call(this.loaded.context, this); } -- cgit v1.2.3 From 5b982abcfe51278062c06fde5fa7e5371f6aef54 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 31 May 2012 00:52:49 -0700 Subject: cleanup item Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index 377c305a..c60a12a2 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -99,8 +99,6 @@ exports.HtmlDocument = Montage.create(Component, { //Removing observer, only needed on initial load this._observer.disconnect(); this._observer = null; - //Show the view - this.model.currentView.show(); //Making callback after view is loaded this.loaded.callback.call(this.loaded.context, this); } -- cgit v1.2.3 From 7fcb10270f9e19415f8452c261c2d0c86916a29a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 1 Jun 2012 00:54:02 -0700 Subject: fixed the 3d grid when switching documents and some cleanup Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index c60a12a2..8cc61026 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -117,10 +117,6 @@ exports.HtmlDocument = Montage.create(Component, { // serializeDocument: { value: function () { - // There are not needed for now since we cannot change them - //this.gridHorizontalSpacing = this.application.ninja.stage.drawUtils.gridHorizontalSpacing; - //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing; - // Serialize the current scroll position //TODO: Move these properties to the design view class this.model.scrollLeft = this.application.ninja.stage._scrollLeft; @@ -132,11 +128,6 @@ exports.HtmlDocument = Montage.create(Component, { // Serialize the selection, the container and grid //TODO: Move this property to the design view class this.model.selection = this.application.ninja.selectedElements.slice(0); - this.model.selectionContainer = this.application.ninja.currentSelectedContainer; - this.draw3DGrid = this.application.ninja.appModel.show3dGrid; - - // Serialize the undo - // TODO: Save the montage undo queue // Pause the videos //TODO: Move these to be handled on the show/hide methods in the view @@ -147,27 +138,15 @@ exports.HtmlDocument = Montage.create(Component, { // deserializeDocument: { value: function () { - // There are not needed for now since we cannot change them - //this.application.ninja.stage.drawUtils.gridHorizontalSpacing = this.gridHorizontalSpacing; - //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing; - // Deserialize the current scroll position //TODO: Move these properties to the design view class this.application.ninja.stage._scrollLeft = this.model.scrollLeft; this.application.ninja.stage._scrollTop = this.model.scrollTop; this.application.ninja.stage._userContentLeft = this.model.userContentLeft; this.application.ninja.stage._userContentTop = this.model.userContentTop; - - //TODO: Move this property to the design view class - this.application.ninja.selectedElements = this.model.selection.slice(0); -// this.application.ninja.currentSelectedContainer = this.model.selectionContainer; - this.application.ninja.appModel.show3dGrid = this.draw3DGrid; // Serialize the undo // TODO: Save the montage undo queue - - //TODO: Move this to the document controller - this.model.isActive = true; } } //////////////////////////////////////////////////////////////////// -- 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/document-html.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index c60a12a2..b5684dc5 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -62,6 +62,8 @@ exports.HtmlDocument = Montage.create(Component, { parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic }); + //Calling the any init routines in the model + this.model.init(); //Initiliazing views and hiding if (this.model.views.design.initialize(this.model.parentContainer)) { //Hiding iFrame, just initiliazing -- 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/document-html.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index 33a41a8e..4a8d5d41 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -88,7 +88,7 @@ exports.HtmlDocument = Montage.create(Component, { //Adding observer to know when template is ready this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); this._observer.observe(this.model.views.design.document.head, {childList: true}); - }.bind(this), template); + }.bind(this), template, {viewCallback: this.handleViewReady, context: this}); } else { //TODO: Identify default view (probably code) } @@ -101,10 +101,14 @@ exports.HtmlDocument = Montage.create(Component, { //Removing observer, only needed on initial load this._observer.disconnect(); this._observer = null; - //Making callback after view is loaded - this.loaded.callback.call(this.loaded.context, this); } }, + handleViewReady: { + value: function() { + //Making callback after view is loaded + this.loaded.callback.call(this.loaded.context, this); + } + }, //////////////////////////////////////////////////////////////////// // closeDocument: { -- 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/document-html.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index 33a41a8e..c9acd2e0 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -68,6 +68,8 @@ exports.HtmlDocument = Montage.create(Component, { if (this.model.views.design.initialize(this.model.parentContainer)) { //Hiding iFrame, just initiliazing this.model.views.design.hide(); + //Setting the iFrame property for reference in helper class + this.model.webGlHelper.iframe = this.model.views.design.iframe; } else { //ERROR: Design View not initialized } @@ -82,7 +84,7 @@ exports.HtmlDocument = Montage.create(Component, { this.model.views.design.iframe.style.opacity = 0; this.model.views.design.content = this.model.file.content; //TODO: Improve reference (probably through binding values) - this.model.views.design.model = this.model; + this.model.views.design._webGlHelper = this.model.webGlHelper; //Rendering design view, using observers to know when template is ready this.model.views.design.render(function () { //Adding observer to know when template is ready -- cgit v1.2.3 From 337efc667372326ae2f9984d89a47bb151016774 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Mon, 11 Jun 2012 13:25:13 -0700 Subject: Changes Made to Object Listing of iFrame Signed-off-by: Armen Kesablyan --- js/document/document-html.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index 04565753..8b82c40f 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -106,7 +106,8 @@ exports.HtmlDocument = Montage.create(Component, { } }, handleViewReady: { - value: function() { + value: function(mObjects) { + this.model.mObjects = mObjects; //Making callback after view is loaded this.loaded.callback.call(this.loaded.context, this); } -- cgit v1.2.3