Simple JavaScript canvas drawing with undo/redo.