aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorPushkar Joshi2012-04-24 08:28:39 -0700
committerPushkar Joshi2012-04-24 08:28:39 -0700
commitf57727d36709bbda03b45788dc12faf31a591b40 (patch)
tree16e5b0341476517c7bb1db9603d2b6cbc97dc5ee /js/tools
parent5da51344c4abf53b4a77bbd4eefbea5ec67f1643 (diff)
downloadninja-f57727d36709bbda03b45788dc12faf31a591b40.tar.gz
re-compute and store the center of the subpath in local coordinates upon file open
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/PenTool.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js
index 4ff77371..8ecc9f79 100755
--- a/js/tools/PenTool.js
+++ b/js/tools/PenTool.js
@@ -786,7 +786,8 @@ exports.PenTool = Montage.create(ShapeTool, {
786 glmat4.multiply( newMat, tMat, newMat); 786 glmat4.multiply( newMat, tMat, newMat);
787 this._selectedSubpathPlaneMat = newMat; 787 this._selectedSubpathPlaneMat = newMat;
788 ViewUtils.setMatrixForElement(this._selectedSubpathCanvas, newMat, true); 788 ViewUtils.setMatrixForElement(this._selectedSubpathCanvas, newMat, true);
789 789
790 //now set the center of the canvas as the center of the bounding box expressed in stage world coordinates
790 var localToStageWorldMat = ViewUtils.getLocalToStageWorldMatrix(this._selectedSubpathCanvas, false, false); 791 var localToStageWorldMat = ViewUtils.getLocalToStageWorldMatrix(this._selectedSubpathCanvas, false, false);
791 this._selectedSubpathCanvasCenter = MathUtils.transformAndDivideHomogeneousPoint(bboxMid, localToStageWorldMat); 792 this._selectedSubpathCanvasCenter = MathUtils.transformAndDivideHomogeneousPoint(bboxMid, localToStageWorldMat);
792 this._selectedSubpathCanvasCenter[0]+= xAdjustment; 793 this._selectedSubpathCanvasCenter[0]+= xAdjustment;