zz85 / timeliner

simple javascript timeline library for animation and prototyping
https://twitter.com/blurspline
MIT License
710 stars 123 forks source link

Implement Simple Undo / Redo System #1

Closed zz85 closed 9 years ago

zz85 commented 9 years ago

There are usually 2 different ways to handle undo / redo

  1. you snapshot and store the states, so you can load them anytime
  2. you store the deltas or events/commands/actions between save points.

Method 1 is simplistic. But it works. It's a lot like git. It works with the reactive flow.

Method 2 has certain use cases. It might map better to a collaborative environment. It is more like hg. It might be a little towards operational transformation.

I think I'll try method 1 first.

zz85 commented 9 years ago

Implemented quick prototype of an undo system here. https://gist.github.com/zz85/07661d84d02250b22aac

zz85 commented 9 years ago

Basic undo and redo in 1.1.0