From 2fd6db5f46208a5aa8fa58d090f795e5b7eb99bb Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 29 May 2012 10:35:06 -0700 Subject: Sped up user-interaction by moving grid drawing into its own canvas so the layout code doesn't have to be run when modifying selected elements. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/draw-utils.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'js/helper-classes/3D/draw-utils.js') diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index 871b832d..75aa308c 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -126,7 +126,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { //initialize with current document this._eltArray = []; this._planesArray = []; - this.setDrawingSurfaceElement(stage.canvas); + this.setDrawingSurfaceElement(stage.gridCanvas); this.setSourceSpaceElement( this.application.ninja.currentDocument.model.documentRoot); this.setWorkingPlane( [0,0,1,0] ); @@ -307,7 +307,6 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { } if(!changed) { - stage.layout.draw(); this.drawWorkingPlane(); this.draw3DCompass(); } @@ -631,8 +630,8 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { if (!this.isDrawingGrid()) return; var saveContext = this.getDrawingSurfaceElement(); - //this.setDrawingSurfaceElement(window.stageManager.layoutCanvas); - this.setDrawingSurfaceElement(this.application.ninja.stage.layoutCanvas); + this.setDrawingSurfaceElement(this.application.ninja.stage.gridCanvas); + this.clear(); // 3 coordinate axes for the plane var zAxis = [this._workingPlane[0], this._workingPlane[1], this._workingPlane[2]]; -- cgit v1.2.3 From 961830a1ab076db70577df735f43cae5e8559e83 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 29 May 2012 14:55:19 -0700 Subject: Moving layout and stageDeps' handleOpenDocument into stage. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/draw-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/helper-classes/3D/draw-utils.js') diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index 75aa308c..9e9a2241 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -627,11 +627,11 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { { value: function () { + this.application.ninja.stage.clearGridCanvas(); if (!this.isDrawingGrid()) return; var saveContext = this.getDrawingSurfaceElement(); this.setDrawingSurfaceElement(this.application.ninja.stage.gridCanvas); - this.clear(); // 3 coordinate axes for the plane var zAxis = [this._workingPlane[0], this._workingPlane[1], this._workingPlane[2]]; -- cgit v1.2.3 From 820005437e7270e72b865a3436d7148e1dd19900 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 29 May 2012 15:42:24 -0700 Subject: Fixed bug with scrolling too much when moving objects in negative space. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/draw-utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/helper-classes/3D/draw-utils.js') diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index 9e9a2241..c98ad8bc 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -276,8 +276,8 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { stage = this.application.ninja.stage, minLeft = stage.userPaddingLeft, minTop = stage.userPaddingTop, - docLeft = stage.documentOffsetLeft, - docTop = stage.documentOffsetTop, + docLeft = stage.userContentLeft, + docTop = stage.userContentTop, l, t, plane, -- cgit v1.2.3