Skip to content

Fix: eyedropper and flood selection to reapply when threshold changes#770

Open
reagan99 wants to merge 2 commits intoplaycanvas:mainfrom
reagan99:fix/flood-eyedropper-threshold
Open

Fix: eyedropper and flood selection to reapply when threshold changes#770
reagan99 wants to merge 2 commits intoplaycanvas:mainfrom
reagan99:fix/flood-eyedropper-threshold

Conversation

@reagan99
Copy link

Summary
This PR fixes an issue where the Eyedropper and Flood selection tools did not update the current selection when the threshold value was changed after clicking. Previously, users had to click again for the new threshold to take effect. With this change, the selection is immediately recomputed whenever the threshold changes.

Changes

  • Eyedropper: store the last click state and re-run color matching on threshold updates
  • Flood: store the last operation (set/add/remove) and re-run flood selection on threshold updates
  • Bind threshold UI to input events for real-time updates and clamp values to [0, 1]

Files Changed

  • src/tools/eyedropper-selection.ts
  • src/tools/flood-selection.ts

Test Plan

  1. Use Eyedropper selection, then change threshold without clicking again → selection updates immediately
  2. Use Flood selection, then change threshold without clicking again → selection updates immediately

@reagan99 reagan99 changed the title Fix eyedropper and flood selection to reapply when threshold changes Fix: eyedropper and flood selection to reapply when threshold changes Jan 27, 2026
@willeastcott willeastcott requested a review from slimbuck January 27, 2026 21:06
@willeastcott willeastcott added the bug Something isn't working label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants