diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/tools/PenTool.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index 0532bdb3..bb163202 100755 --- a/js/tools/PenTool.js +++ b/js/tools/PenTool.js | |||
@@ -337,7 +337,7 @@ exports.PenTool = Montage.create(ShapeTool, { | |||
337 | var hitRec = this.getHitRecord(event.pageX, event.pageY, false); | 337 | var hitRec = this.getHitRecord(event.pageX, event.pageY, false); |
338 | var globalMousePos=null, localMousePos=null, stageWorldMousePos = null, drawingCanvas=null; | 338 | var globalMousePos=null, localMousePos=null, stageWorldMousePos = null, drawingCanvas=null; |
339 | if (!this._selectedSubpathCanvas){ | 339 | if (!this._selectedSubpathCanvas){ |
340 | drawingCanvas = ViewUtils.getStageElement(); | 340 | drawingCanvas = this.application.ninja.currentDocument.model.documentRoot;//ViewUtils.getStageElement(); |
341 | stageWorldMousePos = hitRec.calculateStageWorldPoint(); | 341 | stageWorldMousePos = hitRec.calculateStageWorldPoint(); |
342 | stageWorldMousePos[0]+= snapManager.getStageWidth()*0.5; | 342 | stageWorldMousePos[0]+= snapManager.getStageWidth()*0.5; |
343 | stageWorldMousePos[1]+= snapManager.getStageHeight()*0.5; | 343 | stageWorldMousePos[1]+= snapManager.getStageHeight()*0.5; |
@@ -550,7 +550,7 @@ exports.PenTool = Montage.create(ShapeTool, { | |||
550 | var globalMousePos=null, localMousePos=null, stageWorldMousePos = null; | 550 | var globalMousePos=null, localMousePos=null, stageWorldMousePos = null; |
551 | var drawingCanvas = this._selectedSubpath.getCanvas(); | 551 | var drawingCanvas = this._selectedSubpath.getCanvas(); |
552 | if (!drawingCanvas){ | 552 | if (!drawingCanvas){ |
553 | drawingCanvas = ViewUtils.getStageElement(); | 553 | drawingCanvas = this.application.ninja.currentDocument.model.documentRoot; //ViewUtils.getStageElement(); |
554 | stageWorldMousePos = hitRec.calculateStageWorldPoint(); | 554 | stageWorldMousePos = hitRec.calculateStageWorldPoint(); |
555 | stageWorldMousePos[0]+= snapManager.getStageWidth()*0.5; | 555 | stageWorldMousePos[0]+= snapManager.getStageWidth()*0.5; |
556 | stageWorldMousePos[1]+= snapManager.getStageHeight()*0.5; | 556 | stageWorldMousePos[1]+= snapManager.getStageHeight()*0.5; |