From 4b5cc9cf1f01552f61c08b9299b6e99366432e03 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 24 Apr 2012 15:36:03 -0700 Subject: Added a body controller Signed-off-by: Valerio Virgillito --- 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 8cb88516..b19ca0d0 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -270,7 +270,8 @@ exports.HtmlDocument = Montage.create(Component, { //TODO Finish this implementation once we start caching Core Elements // Assign a model to the UserContent and add the ViewPort reference to it. - document.application.njUtils.makeElementModel(this.documentRoot, "Stage", "stage"); + document.application.njUtils.makeElementModel(this.documentRoot, "Body", "body"); +// this.documentRoot.elementModel.props3D.init(this.documentRoot, true); for(i = 0; i < this._stylesheets.length; i++) { if(this._stylesheets[i].ownerNode.id === "nj-stage-stylesheet") { -- cgit v1.2.3 From 1ccc4d6dcff232b00763a5a49d7ad7a91f78ad3f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 26 Apr 2012 13:24:51 -0700 Subject: Fixing the element model and adding get element Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index b19ca0d0..24eb4f47 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -310,6 +310,12 @@ exports.HtmlDocument = Montage.create(Component, { } }, + GetElementFromPoint: { + value: function(x, y) { + return this._window.getElement(x,y); + } + }, + // Handler for user content main reel. Gets called once the main reel of the template // gets deserialized. // Setting up the currentSelectedContainer to the document body. -- cgit v1.2.3 From 238586be0df568c6804268d97bf9d3ef7cd33fda Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 26 Apr 2012 15:33:48 -0700 Subject: Simplifying the getElement method from stage and adding an exclusion list to the new template Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index 24eb4f47..d9789cd2 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -31,6 +31,10 @@ exports.HtmlDocument = Montage.create(Component, { value: null }, + exclusionList: { + value: ["HTML"] + }, + // Getters for the model. // TODO: Change how these properties are accessed through Ninja name: { @@ -316,6 +320,17 @@ exports.HtmlDocument = Montage.create(Component, { } }, + inExclusion: { + value: function(element) { + if(this.exclusionList.indexOf(element.nodeName) === -1) { + return -1; + } + + return 1; + + } + }, + // Handler for user content main reel. Gets called once the main reel of the template // gets deserialized. // Setting up the currentSelectedContainer to the document body. -- cgit v1.2.3 From a0e730636083eff0c757cd9e16698e3b8e0066c1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 26 Apr 2012 17:05:45 -0700 Subject: Fixed the stage border and layout in the new template Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 24 +++++++++++++++++++++++- 1 file changed, 23 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 d9789cd2..89717dd6 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -32,7 +32,7 @@ exports.HtmlDocument = Montage.create(Component, { }, exclusionList: { - value: ["HTML"] + value: ["HTML", "BODY"] }, // Getters for the model. @@ -46,6 +46,24 @@ exports.HtmlDocument = Montage.create(Component, { } }, + isActive: { + get: function() { + return this.model._isActive; + }, + set: function(value) { + this.model._isActive = value; + } + }, + + needsSave: { + get: function() { + return this.model._needsSave; + }, + set: function(value) { + this.model._needsSave = value; + } + }, + // View Properties // TODO: Move those into a view object - for now dump it here iframe: { @@ -57,6 +75,10 @@ exports.HtmlDocument = Montage.create(Component, { return this._uuid; } }, + + currentView: { + value: "design" + }, //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// init: { -- cgit v1.2.3