aboutsummaryrefslogtreecommitdiff
path: root/js/tools/PenTool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/PenTool.js')
-rwxr-xr-xjs/tools/PenTool.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js
index 60ef4f92..e239b3f1 100755
--- a/js/tools/PenTool.js
+++ b/js/tools/PenTool.js
@@ -601,7 +601,33 @@ exports.PenTool = Montage.create(ShapeTool, {
601 601
602 world.addObject(subpath); 602 world.addObject(subpath);
603 world.render(); 603 world.render();
604 //TODO this will not work if there are multiple shapes in the same canvas
604 newCanvas.elementModel.shapeModel.GLGeomObj = subpath; 605 newCanvas.elementModel.shapeModel.GLGeomObj = subpath;
606 newCanvas.elementModel.shapeModel.shapeCount++;
607 if(newCanvas.elementModel.shapeModel.shapeCount === 1)
608 {
609 newCanvas.elementModel.selection = "Subpath";
610 newCanvas.elementModel.pi = "SubpathPi";
611 newCanvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units;
612 var strokeColor = subpath.getStrokeColor();
613 newCanvas.elementModel.shapeModel.stroke = strokeColor;
614 if(strokeColor) {
615 newCanvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke;
616 }
617 newCanvas.elementModel.shapeModel.strokeMaterial = this._selectedBrushStroke.getStrokeMaterial();
618
619 newCanvas.elementModel.shapeModel.GLGeomObj = subpath;
620 newCanvas.elementModel.shapeModel.useWebGl = this.options.use3D;
621 }
622 else
623 {
624 // TODO - update the shape's info only. shapeModel will likely need an array of shapes.
625 }
626
627 if(newCanvas.elementModel.isShape)
628 {
629 this.application.ninja.selectionController.selectElement(newCanvas);
630 }
605 } //if (!canvas) { 631 } //if (!canvas) {
606 else { 632 else {
607 633