gritzko / swarm

JavaScript replicated model (M of MVC) library
http://swarmdb.net/
MIT License
2.68k stars 97 forks source link

Model version switching #58

Open l-liava-l opened 9 years ago

l-liava-l commented 9 years ago

Hi everyone! I use swarm.js like caching mechanism in my TeX editor. So, i would like to use the shifting of history (ctrl-z, ctrl-shift), but i don't understand how to switch a model versions in swarm.js :(

gritzko commented 8 years ago

Sorry, I misunderstood your question initially. You want to roll back some changes (Ctrl+Z) or apply them back. That involved model changes and is different from recovering historical versions.

I must admit that Swarm has no machinery for that now. In one past deployment, we used a custom anti-operation generator that was able to return the state to a past version. In general, that is datatype-specific.