Skip to content

Conversation

@adroitwhiz
Copy link

@adroitwhiz adroitwhiz commented Jun 5, 2020

Description

In order to add outline support to the fill tool, there needs to be an option to hit "invisible" outlines.

Otherwise, if you set the fill color to transparent, then hover over a path's outline:

  • The hit test will match the outline
  • It'll set the outline to transparent
  • Because the outline is transparent, hit tests won't match it
  • Next time you move the mouse slightly, the hit test will match the fill
  • It'll set the fill to transparent and set the outline to whatever color it was before
  • The hit test will match the outline, and the process repeats...

It involves a lot of flickering so I won't post a GIF here.

CompoundPath._hitTestChildren isn't affected because it only ever disabled checking for fill, and hence was only affected by hitUnfilledPaths.

PointText._hitTestSelf isn't affected because you can't hit test outlines on text :(

Related issues

Checklist

  • New tests added or existing tests modified to cover all changes
    • Tested manually
  • Code conforms with the JSHint rules (npm run jshint passes)

Copy link

@fsih fsih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

@adroitwhiz adroitwhiz merged commit 897bc1e into scratchfoundation:develop Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants