antfu / drauu

Headless SVG-based drawboard in browser.
https://drauu.netlify.app/
MIT License
1.2k stars 64 forks source link

Undo Redo after clear #44

Closed tonai closed 2 months ago

tonai commented 2 months ago

Describe the bug

If you draw some lines, then undo all of them, the redo button is working as expected. When you clear, then try to do the same (draw lines and undo them all) then redo is not working (it is working if you undo some lines, but not if you undo all lines)

Reproduction

https://drauu.netlify.app/

System Info

System:
    OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz
    Memory: 21.31 GB / 30.74 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.15.1/bin/npm
    bun: 1.0.22 - ~/.bun/bin/bun
  Browsers:
    Chrome: 126.0.6478.18

Used Package Manager

npm

Validations

Contributions

antfu commented 2 months ago

PR welcome :) I assume I was lazy to implement that properly :P