richardfxr / fixel

A collaborative web-based pixel art creator.
https://www.fixel.io/
0 stars 0 forks source link

Implement undo redo functionality #15

Closed richardfxr closed 7 months ago

richardfxr commented 7 months ago

Track user strokes locally when drawing and allow undo/redo through the tool bar.

richardfxr commented 7 months ago

New local arrays track the history of user strokes up to a maximum of 100 steps. Users can step through these steps with the undo and redo buttons in the toolbar. If a pixel has been drawn over by a new stroke, undoing or redoing previous steps that include said pixel will not affect it. That is all the conflict resolution logic for now.