diff options
author | Pushkar Joshi | 2012-03-15 14:33:48 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-03-15 14:33:48 -0700 |
commit | e574f722864a246bad40d3f5a4e59f7ccb206ea9 (patch) | |
tree | baad38aa8440b7e929005acc058ca07bcc21bf5a /js/tools | |
parent | 571ed9ef856780eded3ac7104ed0ce72c7c7c81c (diff) | |
download | ninja-e574f722864a246bad40d3f5a4e59f7ccb206ea9.tar.gz |
update values in the PI from values of the selected brush stroke or pen tool path
Diffstat (limited to 'js/tools')
-rw-r--r-- | js/tools/BrushTool.js | 1 | ||||
-rwxr-xr-x | js/tools/PenTool.js | 9 |
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; |