From 806974142d44afdd23534bf2d18eff0a8e701e0c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 8 Jun 2012 16:59:59 -0700 Subject: rewrite: currentSelectedContainer -> domContainer Fixed the currentSelectedContainer by removing bindings and using property change on the current document added the red outline back. Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 6 ++++++ js/document/models/base.js | 3 +++ js/document/models/html.js | 5 ----- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'js/document') diff --git a/js/document/document-html.js b/js/document/document-html.js index 04565753..15f88d09 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -107,6 +107,12 @@ exports.HtmlDocument = Montage.create(Component, { }, handleViewReady: { value: function() { + // TODO: Find a better way to initialize this property + // Assign the domContainer to be the document root on open + if(typeof this.model.domContainer !== "undefined") { + this.model.domContainer = this.model.documentRoot; + } + //Making callback after view is loaded this.loaded.callback.call(this.loaded.context, this); } diff --git a/js/document/models/base.js b/js/document/models/base.js index 5fa06259..1307e0c0 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js @@ -65,6 +65,9 @@ exports.BaseDocumentModel = Montage.create(Component, { _selection: { value: [] }, + domContainer: { + value: null + }, //////////////////////////////////////////////////////////////////// // selection: { diff --git a/js/document/models/html.js b/js/document/models/html.js index 7064c6e3..4a232ee1 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js @@ -26,11 +26,6 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { // this.libs = {montage: false, canvas: false, montageId: null, canvasId: null}; } - }, - //////////////////////////////////////////////////////////////////// - // - selectionContainer: { - value: [] }, //////////////////////////////////////////////////////////////////// // -- cgit v1.2.3