I am trying to use DragCreatingTool.js in GoJs.
default I am able to draw as rectangle shape via mouse click.
But I want to change shape into circle/rectangle dynamically outside the Go Js Button Click event.
If I execute the below code, in the tool box it change to circle.
myDiagram.startTransaction(“Update Tool Shape Figure”);
var tool = myDiagram.toolManager.findTool(“DragCreating”);
var _box = tool.box;
var _boxShape = _box.findObject(‘SHAPE’);
_boxShape.figure = “Circle”;
myDiagram.commitTransaction(“Update Tool Shape Figure”);
if I start drawing via mouse , it showing as a circle.
if I complete a circle it changed to rectangle.
Please help me to change the shape dynamically using DragCreatingTool.