aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorPushkar Joshi2012-05-31 14:34:21 -0700
committerPushkar Joshi2012-05-31 14:34:21 -0700
commit0a7357bad4e646177b0420848844f503e0b64161 (patch)
tree7845956332034c8893fa8470176848d115f5300e /js/tools
parent4bc52365b1f81a386c3c59fd7c6ad874bb387cb5 (diff)
downloadninja-0a7357bad4e646177b0420848844f503e0b64161.tar.gz
somewhat working version of the canvas runtime for pen paths (the runtime renders properly if we go through debugger)...also removed calls to getStageElement from pen tool
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/PenTool.js4
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;