diff options
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/PenTool.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index 0dbefd16..91b7606e 100755 --- a/js/tools/PenTool.js +++ b/js/tools/PenTool.js | |||
@@ -419,10 +419,6 @@ exports.PenTool = Montage.create(ShapeTool, { | |||
419 | bboxMax = this._selectedSubpath.getBBoxMax(); | 419 | bboxMax = this._selectedSubpath.getBBoxMax(); |
420 | var bboxMid = [0.5 * (bboxMax[0] + bboxMin[0]), 0.5 * (bboxMax[1] + bboxMin[1]), 0.5 * (bboxMax[2] + bboxMin[2])]; | 420 | var bboxMid = [0.5 * (bboxMax[0] + bboxMin[0]), 0.5 * (bboxMax[1] + bboxMin[1]), 0.5 * (bboxMax[2] + bboxMin[2])]; |
421 | 421 | ||
422 | this._selectedSubpath.setPlaneCenter(bboxMid); | ||
423 | this._selectedSubpath.setCanvasX(bboxMid[0]); | ||
424 | this._selectedSubpath.setCanvasY(bboxMid[1]); | ||
425 | |||
426 | //call render shape with the bbox width and height | 422 | //call render shape with the bbox width and height |
427 | this.RenderShape(bboxWidth, bboxHeight, bboxMid, this._penPlaneMat, this._penCanvas); | 423 | this.RenderShape(bboxWidth, bboxHeight, bboxMid, this._penPlaneMat, this._penCanvas); |
428 | } | 424 | } |
@@ -437,6 +433,9 @@ exports.PenTool = Montage.create(ShapeTool, { | |||
437 | 433 | ||
438 | var left = Math.round(midPt[0] - 0.5 * w); | 434 | var left = Math.round(midPt[0] - 0.5 * w); |
439 | var top = Math.round(midPt[1] - 0.5 * h); | 435 | var top = Math.round(midPt[1] - 0.5 * h); |
436 | this._selectedSubpath.setPlaneCenter(midPt); | ||
437 | this._selectedSubpath.setCanvasLeft(left); | ||
438 | this._selectedSubpath.setCanvasTop(top); | ||
440 | 439 | ||
441 | if (!canvas) { | 440 | if (!canvas) { |
442 | var newCanvas = null; | 441 | var newCanvas = null; |