aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/BrushTool.js1
-rwxr-xr-xjs/tools/PenTool.js9
2 files changed, 6 insertions, 4 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js
index c93672a9..90010cdf 100644
--- a/js/tools/BrushTool.js
+++ b/js/tools/BrushTool.js
@@ -266,6 +266,7 @@ exports.BrushTool = Montage.create(ShapeTool, {
266 var brushStroke = this._selectedBrushStroke; 266 var brushStroke = this._selectedBrushStroke;
267 if (brushStroke){ 267 if (brushStroke){
268 brushStroke.setWorld(world); 268 brushStroke.setWorld(world);
269 brushStroke.setCanvas(newCanvas);
269 270
270 brushStroke.setPlaneMatrix(planeMat); 271 brushStroke.setPlaneMatrix(planeMat);
271 var planeMatInv = glmat4.inverse( planeMat, [] ); 272 var planeMatInv = glmat4.inverse( planeMat, [] );
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js
index e239b3f1..779b7f16 100755
--- a/js/tools/PenTool.js
+++ b/js/tools/PenTool.js
@@ -467,9 +467,9 @@ exports.PenTool = Montage.create(ShapeTool, {
467 if (this.application.ninja.colorController.colorToolbar.stroke.webGlColor){ 467 if (this.application.ninja.colorController.colorToolbar.stroke.webGlColor){
468 this._selectedSubpath.setStrokeColor(this.application.ninja.colorController.colorToolbar.stroke.webGlColor); 468 this._selectedSubpath.setStrokeColor(this.application.ninja.colorController.colorToolbar.stroke.webGlColor);
469 } 469 }
470 //if (this.application.ninja.colorController.colorToolbar.fill.webGlColor){ 470 if (this.application.ninja.colorController.colorToolbar.fill.webGlColor){
471 // this._selectedSubpath.setFillColor(this.application.ninja.colorController.colorToolbar.fill.webGlColor); 471 this._selectedSubpath.setFillColor(this.application.ninja.colorController.colorToolbar.fill.webGlColor);
472 //} 472 }
473 } //if this is a new path being rendered 473 } //if this is a new path being rendered
474 474
475 this._selectedSubpath.makeDirty(); 475 this._selectedSubpath.makeDirty();
@@ -594,6 +594,7 @@ exports.PenTool = Montage.create(ShapeTool, {
594 594
595 var subpath = this._selectedSubpath; //new GLSubpath(); 595 var subpath = this._selectedSubpath; //new GLSubpath();
596 subpath.setWorld(world); 596 subpath.setWorld(world);
597 subpath.setCanvas(newCanvas);
597 subpath.setPlaneMatrix(planeMat); 598 subpath.setPlaneMatrix(planeMat);
598 var planeMatInv = glmat4.inverse( planeMat, [] ); 599 var planeMatInv = glmat4.inverse( planeMat, [] );
599 subpath.setPlaneMatrixInverse(planeMatInv); 600 subpath.setPlaneMatrixInverse(planeMatInv);
@@ -614,7 +615,7 @@ exports.PenTool = Montage.create(ShapeTool, {
614 if(strokeColor) { 615 if(strokeColor) {
615 newCanvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke; 616 newCanvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke;
616 } 617 }
617 newCanvas.elementModel.shapeModel.strokeMaterial = this._selectedBrushStroke.getStrokeMaterial(); 618 newCanvas.elementModel.shapeModel.strokeMaterial = subpath.getStrokeMaterial();
618 619
619 newCanvas.elementModel.shapeModel.GLGeomObj = subpath; 620 newCanvas.elementModel.shapeModel.GLGeomObj = subpath;
620 newCanvas.elementModel.shapeModel.useWebGl = this.options.use3D; 621 newCanvas.elementModel.shapeModel.useWebGl = this.options.use3D;