voronoi
                                
                                 voronoi copied to clipboard
                                
                                    voronoi copied to clipboard
                            
                            
                            
                        feature requests: mouseover preview for the 'add' function, undo/redo
Discussed in https://github.com/WebSVG/voronoi/discussions/21
Originally posted by raminrahni June 14, 2022 Thank you so much for creating and sharing this wonderful tool! It's incredibly useful. Are there any plans to implement a preview feature for the 'add' function? It would be super helpful to know where the cell is going to be cut before clicking, especially in the absence of an undo function (another feature that would be extremely useful). Thanks!
I write some notes here on to how to perform these features:
Preview
I hesitate if that could be accepted by all users as default mode otherwise create a checkbox to enable/disable it.
- with add mode, on area enter create the new cell immediately and switch to move (implicitly without showing the mode change in the selection)
- on click : stop the move
- on area exit : remove the new cell that stayed on the edge
Undo
Easy one :
- this.array.pop()
- also possibly if we keep the cell count in sync with the seeds slider, then moving it backward will be removing seeds in the creation order, but the slider will sample new random seed on increase
- an undo, redo slider could execute the history sequence in the right order