Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up hover handling #4081

Merged
merged 1 commit into from
Jan 2, 2020
Merged

Clean up hover handling #4081

merged 1 commit into from
Jan 2, 2020

Conversation

Pessimistress
Copy link
Collaborator

Move calling layer callbacks outside of DeckPicker. This makes the handling of hover events consistent with click, drag etc.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.5%) to 80.858% when pulling 3562824 on x/picking-cleanup into e2b76a3 on master.

Copy link
Contributor

@xintongxia xintongxia left a comment

Choose a reason for hiding this comment

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

Any tests could cover this change since deck is a critical class?


// Execute callbacks
let handled = false;
if (pickedInfo.layer) {
Copy link
Contributor

Choose a reason for hiding this comment

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

how does it decide whether should call onHover or onClick to handle picking here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

_pickRequest is only used for throttling hover events. Click is handled immediately in onPointerDown.

@Pessimistress Pessimistress merged commit dd628df into master Jan 2, 2020
@Pessimistress Pessimistress deleted the x/picking-cleanup branch January 2, 2020 21:15
chrisgervang pushed a commit that referenced this pull request Jan 31, 2020
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.

3 participants