diff options
Diffstat (limited to 'js/tools/BrushTool.js')
-rw-r--r-- | js/tools/BrushTool.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js index fec89eb2..752aa2a3 100644 --- a/js/tools/BrushTool.js +++ b/js/tools/BrushTool.js | |||
@@ -13,6 +13,8 @@ var ElementMediator = require("js/mediators/element-mediator").ElementMediator; | |||
13 | var TagTool = require("js/tools/TagTool").TagTool; | 13 | var TagTool = require("js/tools/TagTool").TagTool; |
14 | var snapManager = require("js/helper-classes/3D/snap-manager").SnapManager; | 14 | var snapManager = require("js/helper-classes/3D/snap-manager").SnapManager; |
15 | 15 | ||
16 | var BrushStroke = require("js/lib/geom/brush-stroke").BrushStroke; | ||
17 | |||
16 | exports.BrushTool = Montage.create(ShapeTool, { | 18 | exports.BrushTool = Montage.create(ShapeTool, { |
17 | hasReel: { value: false }, | 19 | hasReel: { value: false }, |
18 | _toolID: { value: "brushTool" }, | 20 | _toolID: { value: "brushTool" }, |
@@ -63,7 +65,7 @@ exports.BrushTool = Montage.create(ShapeTool, { | |||
63 | } | 65 | } |
64 | //start a new brush stroke | 66 | //start a new brush stroke |
65 | if (this._selectedBrushStroke === null){ | 67 | if (this._selectedBrushStroke === null){ |
66 | this._selectedBrushStroke = new GLBrushStroke(); | 68 | this._selectedBrushStroke = new BrushStroke(); |
67 | if (this.application.ninja.colorController.colorToolbar.stroke.webGlColor){ | 69 | if (this.application.ninja.colorController.colorToolbar.stroke.webGlColor){ |
68 | this._selectedBrushStroke.setStrokeColor(this.application.ninja.colorController.colorToolbar.stroke.webGlColor); | 70 | this._selectedBrushStroke.setStrokeColor(this.application.ninja.colorController.colorToolbar.stroke.webGlColor); |
69 | } | 71 | } |
@@ -192,7 +194,7 @@ exports.BrushTool = Montage.create(ShapeTool, { | |||
192 | var bboxMax = this._selectedBrushStroke.getBBoxMax(); | 194 | var bboxMax = this._selectedBrushStroke.getBBoxMax(); |
193 | var bboxWidth = bboxMax[0] - bboxMin[0]; | 195 | var bboxWidth = bboxMax[0] - bboxMin[0]; |
194 | var bboxHeight = bboxMax[1] - bboxMin[1]; | 196 | var bboxHeight = bboxMax[1] - bboxMin[1]; |
195 | var bboxMid = Vector.create([0.5 * (bboxMax[0] + bboxMin[0]), 0.5 * (bboxMax[1] + bboxMin[1]), 0.5 * (bboxMax[2] + bboxMin[2])]); | 197 | var bboxMid = [0.5 * (bboxMax[0] + bboxMin[0]), 0.5 * (bboxMax[1] + bboxMin[1]), 0.5 * (bboxMax[2] + bboxMin[2])]; |
196 | 198 | ||
197 | this._selectedBrushStroke.setCanvasX(bboxMid[0]); | 199 | this._selectedBrushStroke.setCanvasX(bboxMid[0]); |
198 | this._selectedBrushStroke.setCanvasY(bboxMid[1]); | 200 | this._selectedBrushStroke.setCanvasY(bboxMid[1]); |