aboutsummaryrefslogtreecommitdiff
path: root/js/tools/BrushTool.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-05-01 14:52:12 -0700
committerPushkar Joshi2012-05-01 14:52:12 -0700
commitd91e67e06095afbdbe47353eb71d2829a9a9c401 (patch)
tree6fe4f121b9d52a64d51832407628de320d961641 /js/tools/BrushTool.js
parent14e101e3822da595baaaaeaf91e9a00c79ac4b38 (diff)
downloadninja-d91e67e06095afbdbe47353eb71d2829a9a9c401.tar.gz
handle left button up correctly for the brush tool
Diffstat (limited to 'js/tools/BrushTool.js')
-rw-r--r--js/tools/BrushTool.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js
index ded56ecc..1666d311 100644
--- a/js/tools/BrushTool.js
+++ b/js/tools/BrushTool.js
@@ -225,9 +225,11 @@ exports.BrushTool = Montage.create(ShapeTool, {
225 this._hasDraw = false; 225 this._hasDraw = false;
226 226
227 //finish giving enough info. to the brush stroke 227 //finish giving enough info. to the brush stroke
228 this._selectedBrushStroke.setPlaneMatrix(this._brushStrokePlaneMat); 228 if (this._selectedBrushStroke){
229 this._selectedBrushStroke.setPlaneMatrixInverse(glmat4.inverse(this._brushStrokePlaneMat,[])); 229 this._selectedBrushStroke.setPlaneMatrix(this._brushStrokePlaneMat);
230 this._selectedBrushStroke.setDragPlane(this._draggingPlane); 230 this._selectedBrushStroke.setPlaneMatrixInverse(glmat4.inverse(this._brushStrokePlaneMat,[]));
231 this._selectedBrushStroke.setDragPlane(this._draggingPlane);
232 }
231 233
232 //display the previously drawn stroke in a separate canvas 234 //display the previously drawn stroke in a separate canvas
233 this.RenderCurrentBrushStroke(); 235 this.RenderCurrentBrushStroke();