From f4eccf3e7cb76a14a3546a646575162dbd831538 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Wed, 4 Apr 2012 15:52:41 -0700 Subject: draw the path overlay (and anchor points) taking into account the transformation applied to the element canvas and the stage canvas. Still quite buggy. --- js/tools/drawing-tool-base.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/tools/drawing-tool-base.js') diff --git a/js/tools/drawing-tool-base.js b/js/tools/drawing-tool-base.js index 8d87605c..991a2f1c 100755 --- a/js/tools/drawing-tool-base.js +++ b/js/tools/drawing-tool-base.js @@ -158,6 +158,8 @@ exports.DrawingToolBase = Montage.create(Montage, { // get the center of the circle in stage world space var swPos = viewUtils.postViewToStageWorld(MathUtils.transformPoint(psPos, hitRec.getPlaneMatrix()), hitRec.getElt()); + //var swPos = hitRec.calculateStageWorldPoint(); todo figure out why we cannot just use this function instead of the above + // the stage world space point is now relative to the center of the 3D space. To // calculate the left and top offsets, this must be offset by the stage dimensions swPos[0] += snapManager.getStageWidth() / 2.0; -- cgit v1.2.3