Skip to content

[players] Fix persisted eraser path for annotations#2118

Open
ivancea wants to merge 5 commits into
cgwire:mainfrom
ivancea:fix-eraser-path
Open

[players] Fix persisted eraser path for annotations#2118
ivancea wants to merge 5 commits into
cgwire:mainfrom
ivancea:fix-eraser-path

Conversation

@ivancea

@ivancea ivancea commented Jul 6, 2026

Copy link
Copy Markdown

Problem

While erasing annotations, apparently erased lines will reappear later, because the code that stores the eraser mask uses a "limited" Fabric intersection calculation:

Fabric's intersectsWithObject() just checks the path bbox (Through getCoords()).

Unfortunately, that doesn't take the stroke width into account. In fact, not even intersectPolygonPolygon() accepts a stroke right now.

Note that live preview uses a different logic compared to the persisted mask.

Solution

Use a custom bbox check adding the radius. Until Fabric fixes it, that's a simple approach, and it keeps the performance of the original.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant