Skip to content

Is there a way to disable auto snapshot and instead trigger it manually? #216

@zushenyan

Description

@zushenyan

I have a scenario where undo/redo functionality is needed in an application with constantly changing state, such as a canvas.

We have multiple types of annotations that can be drawn on the chart, but we only want to trigger an undo/redo "snapshot" when certain conditions are met. For example, this could be the mouse up event when a shape has finished drawing, or by excluding a specific shape after it has been modified.

I've looked into the documentation and saw there are pause and resume methods. I assume it's possible to achieve this by constantly toggling between pause and resume, but I'm not sure if this is a sound approach for an application with a continuously changing state.

Is there a way to disable auto undo/redo by default, and instead manually trigger it only when I need to?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions