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

fix: detect dragging only by the delta changes #853

Merged
merged 3 commits into from
Oct 6, 2020

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Oct 6, 2020

Summary

This fix changes the drag detection checking only the delta change between the mouse down position and the current mouse move removing the time check. This allows fast interaction used in CI functional tests without the need to add a delay between actions.

@markov00 markov00 added enhancement New feature or request :interactions Interactions related issue labels Oct 6, 2020
@markov00 markov00 requested a review from darnautov October 6, 2020 15:18
Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 66 to 68
const dragging = !!(
state.pointer.down && getDelta(state.pointer.down.position, action.position) > DRAG_DETECTION_PIXEL_DELTA
);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
const dragging = !!(
state.pointer.down && getDelta(state.pointer.down.position, action.position) > DRAG_DETECTION_PIXEL_DELTA
);
const dragging = !!state.pointer.down && getDelta(state.pointer.down.position, action.position) > DRAG_DETECTION_PIXEL_DELTA;

Copy link
Member Author

Choose a reason for hiding this comment

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

done in f182f94

@markov00 markov00 merged commit 219f9dd into elastic:master Oct 6, 2020
@markov00 markov00 deleted the 2020_10_06-fix_drag_interactions branch October 6, 2020 16:18
markov00 pushed a commit that referenced this pull request Oct 6, 2020
## [23.2.1](v23.2.0...v23.2.1) (2020-10-06)

### Bug Fixes

* detect dragging only by the delta changes ([#853](#853)) ([219f9dd](219f9dd))
* filter highlighted y values ([#855](#855)) ([d3ebe77](d3ebe77))
@markov00
Copy link
Member Author

markov00 commented Oct 6, 2020

🎉 This PR is included in version 23.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Oct 6, 2020
@markov00
Copy link
Member Author

🎉 This PR is included in version 23.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request :interactions Interactions related issue released on @23.2.x released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants