Skip to content

Fix ScratchJr paint bucket interior hit testing - #99

Open
dkrame11 wants to merge 1 commit into
developfrom
eng-7719-fix-paint-bucket-fill
Open

dkrame11 wants to merge 1 commit into
developfrom
eng-7719-fix-paint-bucket-fill

Conversation

@dkrame11

Copy link
Copy Markdown

Summary

  • detect clicks inside unfilled SVG shapes using their geometry instead of relying only on painted pixels
  • preserve SVG layer ordering when combining native intersection and interior hits
  • handle transformed shapes and ignore clip-path geometry
  • restore the precise 1×1 native intersection area instead of the unreliable 100×100 workaround

Testing

  • verified in Chromium that clicking the center of a large unfilled shape fills that shape without changing the background
  • verified transformed path interiors resolve to the path
  • ./node_modules/.bin/eslint src/painteditor/Ghost.js
  • npm run build

Fixes ENG-7719

@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

ENG-7719

@dkrame11

Copy link
Copy Markdown
Author

@dkrame11
dkrame11 requested a review from toto4tots September 17, 2026 19:55

Copy link
Copy Markdown

image.png

I can't repro the issue on live 🤔
https://www.loom.com/share/33b2de18037842f4870e8274c90fdbc2

Copy link
Copy Markdown
Author

hmmmmmmm

Copy link
Copy Markdown
Author

well this doesnt break anything…

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.

2 participants