You are browsing as a guest. Sign up (or log in) to start making projects!

54m 30s logged

Devlog #3: Undo Redo Engine and Dark Mode

The aim was first to create an undo redo option where the user can revert back to the previous change if they made a mistake or sth.

To do this i made the following changes:
I created two arrays, one for undoHistory and one for redoHistory. They work in such a way that every time you fork or delete a branch, the app takes a snapshot of the DOM and pushes it to the stack. The app only takes a snapshot of the canvas right before you make a structural change (like forking or deleting a branch). If you hit Ctrl+Z, it pops that HTML snapshot back onto the screen. Keystroke typos are still handled by the browser’s native undo.

The next change is the dark mode. This is quite self explanatory. I added a dark mode to the website to offer customization options for the user. The preference is also saved to localStorage so the website remembers what theme the user was on.

0
3

Comments 0

No comments yet. Be the first!