gniziemazity / advanced_drawing_app

Making an advanced drawing app during my live streams:
MIT License
28 stars 24 forks source link

move text edit history management to HistoryTools #51

Closed Iyusuf40 closed 4 days ago

Iyusuf40 commented 1 week ago
gniziemazity commented 4 days ago

Yes, those functions belong to the history tools, however, I also imagine this tool you're building could be used by others as well, in any project that requires a text editor on the canvas. In that case, encapsulating undo/redo in the tool itself could be the way to go (just thinking out loud).

pieterdeschepper commented 4 days ago

If you make it event-based, you can have best of both worlds

gniziemazity commented 2 days ago

If you make it event-based, you can have best of both worlds

Wouldn't that mean you need to reimplement undo/redo using those events in some other app?

Iyusuf40 commented 16 hours ago

In this PR, I have tried to encapsulate the editor limiting dependencies to only Vector class and rotateCanvas function.