ailon / markerjs2

Add image annotation to your web apps.
https://markerjs.com
Other
142 stars 39 forks source link

Undo feature functions differently based on MarkerType: FreehandMarker #138

Closed jljohnson001 closed 1 year ago

jljohnson001 commented 1 year ago

Steps to reproduce:

Expected behavior:

Actual behavior:

Note: If this is expected behavior, I will modify my request to include this detail in Marker2JS docs.

FreehandMarker image

Undo image

ailon commented 1 year ago

FreehandMarker is a very special type of marker in marker.js as the drawing is done in another context. So it only hits the "undo" subsytem after the drawing is done. The way to mitigate this is the newFreehandMarkerOnPointerUp setting. This way undo will work as you expect, but each drawn part (mouse down to mouse up) will be a separate marker.

Good point about documenting this somewhere! Thank you.