aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/BrushTool.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js
index 776d914c..fec89eb2 100644
--- a/js/tools/BrushTool.js
+++ b/js/tools/BrushTool.js
@@ -67,6 +67,10 @@ exports.BrushTool = Montage.create(ShapeTool, {
67 if (this.application.ninja.colorController.colorToolbar.stroke.webGlColor){ 67 if (this.application.ninja.colorController.colorToolbar.stroke.webGlColor){
68 this._selectedBrushStroke.setStrokeColor(this.application.ninja.colorController.colorToolbar.stroke.webGlColor); 68 this._selectedBrushStroke.setStrokeColor(this.application.ninja.colorController.colorToolbar.stroke.webGlColor);
69 } 69 }
70 //add this point to the brush stroke in case the user does a mouse up before doing a mouse move
71 var currMousePos = this._getUnsnappedPosition(event.pageX, event.pageY);
72 this._selectedBrushStroke.addPoint(currMousePos);
73
70 //TODO get these values from the options 74 //TODO get these values from the options
71 this._selectedBrushStroke.setStrokeWidth(20); 75 this._selectedBrushStroke.setStrokeWidth(20);
72 } 76 }
@@ -108,7 +112,7 @@ exports.BrushTool = Montage.create(ShapeTool, {
108 112
109 if (this._isDrawing) { 113 if (this._isDrawing) {
110 var currMousePos = this._getUnsnappedPosition(event.pageX, event.pageY); 114 var currMousePos = this._getUnsnappedPosition(event.pageX, event.pageY);
111 if (this._selectedBrushStroke){ 115 if (this._selectedBrushStroke && this._selectedBrushStroke.getNumPoints()<100){
112 this._selectedBrushStroke.addPoint(currMousePos); 116 this._selectedBrushStroke.addPoint(currMousePos);
113 } 117 }
114 this.ShowCurrentBrushStrokeOnStage(); 118 this.ShowCurrentBrushStrokeOnStage();