From c58dc96130c7eb5d964af53e9ad6e80bba5e647f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Apr 2012 17:24:40 -0700 Subject: initial stage web template Signed-off-by: Valerio Virgillito --- js/stage/stage.reel/stage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/stage') diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index ec8c0e55..567bc333 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -252,7 +252,7 @@ exports.Stage = Montage.create(Component, { this.application.ninja.currentDocument.savedLeftScroll = this._iframeContainer.scrollLeft; this.application.ninja.currentDocument.savedTopScroll = this._iframeContainer.scrollTop; - this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); + this.userContentBorder = 0;//parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); this._userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder; this._userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder; -- cgit v1.2.3 From c5e66f69b108e359b00c8fd897a4278812484c55 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 20 Apr 2012 12:09:54 -0700 Subject: Fixing translate handles to draw without zoom value. Also fixed some typos in zoom code. Signed-off-by: Nivesh Rajbhandari --- js/stage/tool-handle.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'js/stage') diff --git a/js/stage/tool-handle.js b/js/stage/tool-handle.js index d353da47..63cf30e5 100755 --- a/js/stage/tool-handle.js +++ b/js/stage/tool-handle.js @@ -585,7 +585,20 @@ exports.TranslateHandle = Montage.create(ToolHandle, { this._origin = pointOnElt; - var viewMat = viewUtils.getMatrixFromElement(this.application.ninja.currentDocument.documentRoot); + var stage = this.application.ninja.currentDocument.documentRoot; + var viewMat = viewUtils.getMatrixFromElement(stage); + // Get viewMat without zoom value + var zoom = this.application.ninja.documentBar.zoomFactor/100; + if(zoom !== 1) + { + var zoomMatInv = Matrix.create( [ + [ 1/zoom, 0, 0, 0], + [ 0, 1/zoom, 0, 0], + [ 0, 0, 1/zoom, 0], + [ 0, 0, 0, 1] + ] ); + glmat4.multiply( zoomMatInv, viewMat, viewMat ); + } var transMat = viewMat.slice(0); if(inLocalMode) -- cgit v1.2.3 From 3dfd75a1d7948ef369188e1ca23c0f044c0d17a1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 20 Apr 2012 16:43:31 -0700 Subject: more backup fixes for the old stage Signed-off-by: Valerio Virgillito --- js/stage/stage.reel/stage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/stage') diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 567bc333..ec8c0e55 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -252,7 +252,7 @@ exports.Stage = Montage.create(Component, { this.application.ninja.currentDocument.savedLeftScroll = this._iframeContainer.scrollLeft; this.application.ninja.currentDocument.savedTopScroll = this._iframeContainer.scrollTop; - this.userContentBorder = 0;//parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); + this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); this._userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder; this._userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder; -- cgit v1.2.3 From d0af21d80441cb7ffe3a92ed00f8dc9b90867098 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 23 Apr 2012 13:41:16 -0700 Subject: adjusting the bread crumb to work with the new template Initial container get setup in ninja now. Signed-off-by: Valerio Virgillito --- js/stage/stage.reel/stage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/stage') diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index ec8c0e55..8382135d 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -252,7 +252,9 @@ exports.Stage = Montage.create(Component, { this.application.ninja.currentDocument.savedLeftScroll = this._iframeContainer.scrollLeft; this.application.ninja.currentDocument.savedTopScroll = this._iframeContainer.scrollTop; - this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); + // Hardcode this value so that it does not fail for the new stage architecture + // TODO: Remove marker for old template: NINJA-STAGE-REWORK + this.userContentBorder = 1; //parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); this._userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder; this._userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder; -- cgit v1.2.3