fabricjs / fabric.js

Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
http://fabricjs.com
Other
28.02k stars 3.45k forks source link

[Feature]: Undo Redo for EraserBrush #9883

Closed quangduxng closed 1 month ago

quangduxng commented 1 month ago

CheckList

Description

I need new feature: undo redo

Current State

`  
                fabricRef.current.isDrawingMode = true;
                fabricRef.current.off("mouse:move");
                // @ts-ignore
                fabricRef.current.freeDrawingBrush = new fabric.EraserBrush(fabricRef.current);
                fabricRef.current.freeDrawingBrush.width = widthPoint;
        `

Additional Context

No response

asturur commented 1 month ago

Undo redo is not something fabricJS ship with. It has been discussed in various issues how to get there and different way to implement that, please have a search in past issues, closed or open