Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit ef1b9cc

Browse files
Fixed issue #492: reset undoStack when loading shapes
1 parent 7ba34c9 commit ef1b9cc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v0.*.* (Upcoming release)
2+
* Reset undostack when loadSnapshot is called
3+
* Store moving a shape with the SelectTool in undoStack
4+
15
v0.5.0:
26
* Support for React 15 & 16
37
* Fix XSS vulnerabilities in text tool (interactive & SVG output)

src/core/LiterallyCanvas.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,11 @@ module.exports = class LiterallyCanvas
486486
@setColor(k, snapshot.colors[k])
487487

488488
if snapshot.shapes
489+
# reset shapes
489490
@shapes = []
491+
# reset undostack aswell when loading a snapshot
492+
@undostack = []
493+
490494
for shapeRepr in snapshot.shapes
491495
shape = JSONToShape(shapeRepr)
492496
@execute(new actions.AddShapeAction(this, shape)) if shape

0 commit comments

Comments
 (0)