diff options
author | Jon Reid | 2012-03-06 14:15:18 -0800 |
---|---|---|
committer | Jon Reid | 2012-03-06 14:15:18 -0800 |
commit | 78d42c7cbf9205ed2e4faee1d8ddf02a4725edd3 (patch) | |
tree | c395b703f21431dcb4432c725f4c860431add61b /js/tools/BrushTool.js | |
parent | fa8b81d4f436c0b8564c8dcdd22d8dd6d5bccfaa (diff) | |
parent | 60bba95eaffa8b5c741c6c85fb84b327cd75d6c3 (diff) | |
download | ninja-78d42c7cbf9205ed2e4faee1d8ddf02a4725edd3.tar.gz |
Merge branch 'Timeline-uber' into timeline-serialized
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]); |