Draw with the mouse illustrator style

it is possible to use the library Figures.js to draw only the circle and define the size using the mousedownclic event, some small example.

Thks

I’m not sure what you mean. You can certainly create a Circle Shape and then have the user resize it.

If you want the sequence where the user does a mouse-down at a point and a drag creates the Shape and automatically resizes that shape, see the DragCreatingTool extension: Drag Creating Tool

Perhaps you will want to modify that tool a bit if you want slightly different behaviors, for example by drawing a circle instead of a rectangle during the drag.

Yes, is what I was looking for, thank you very much

I can pass the type of figure I want to draw to DragCreatingTool in some way, on writing some method

??? I’m having difficulty understanding what you want.

The DragCreatingTool can work with almost any node template, and the DragCreatingTool.archetypeNodeData can be any node data object.

sorry for my bad english,

I just want to change the type of shape with a button and change from square to circle

That’s OK. Just define your template the way that you want and set the archetypeNodeData properties that you want.