Default Toolbar
First of all this is an excellent library, thank you all for your work I would like to propose a new feature, a toolbar palette component that could be instantiated by default and customized. This toolbar component would include several buttons by default:
- Arrow that would be used to select elements and if the mouse is located on the canvas it would be a hand to be able to drag the canvas. The ESC key would select this tool if other is selected.
- Rhombus
- Circle/Ellipse
- Square/Rectangle
- Label to create texts
- Eraser
- Cross that would be used to make connections between components
- Multiple selection tool to select some elements
- Group elements. This tool would draw a square, and all the elements that are inside will belong to the same group leaving this square visible
- Tooltip to add to components in the canvas
The toolbar component would be floating so that it could be moved around the canvas, and it could be minimized to take up little space. We as developers and consumers could add and remove components to this toolbar in our applications to customize it via a property palette or something similar. The palette could have an entries property where we could add new toolbar items.
<Svelvet {nodes} {edges} {palette} />
Group functionality was added in Svelvet 7, but this a fantastic idea and you should expect to see a version of this implemented in the future.
Thank you!