Skip to content

Allow hitTest() to look for 'container' classes - #1774

Open
hokiedsp wants to merge 1 commit into
paperjs:developfrom
hokiedsp:Fix/hitTest-class-compound
Open

hokiedsp wants to merge 1 commit into
paperjs:developfrom
hokiedsp:Fix/hitTest-class-compound

Conversation

@hokiedsp

Copy link
Copy Markdown

Description

This PR enables hitTest() option argument to specify a "container" class (e.g., CompoundPath, Group, SymbolItem) as its class key.

My use case is to be able to test if the mouse pointer is over a particular SymbolItem (actually, a derived class thereof). Originally, hitTest() returns null with options = { class: SymbolItem, ... }

Related issues

None I could find.

Checklist

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

@lehni
lehni force-pushed the develop branch 2 times, most recently from 39b63a1 to b90a711 Compare June 19, 2020 17:45
@lehni
lehni force-pushed the develop branch 3 times, most recently from 4a6bf6f to 0f4afc5 Compare June 22, 2020 13:18
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