Andrei486 / uml-diagram-collab

0 stars 0 forks source link

Implement save/load #103

Closed Andrei486 closed 6 months ago

Andrei486 commented 6 months ago

First step: implement saving and loading a command list to/from a file. Ensure that all commands that need to be added to the list are actually added, both on client and host side, and ensure that loading correctly re-creates the command list and can apply them on startup. (PR #98)

Second step: when the command list is being saved, "compress" the saved version, the current one stays unmodified. This process should keep only the minimum number of commands needed to re-create the diagram without any loss.

Andrei486 commented 6 months ago

Idea for compressing a command list:

Obviously this is a WIP solution and I don't know if it'll work. There are also parts of this to figure out: we'll likely need a way to figure out what elements an arbitrary command actually affects (casting might work, but look into interfaces for a cleaner solution?).