-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[charts] Add pressAndDrag
pan gesture
#19779
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
Conversation
Deploy preview: https://deploy-preview-19779--material-ui-x.netlify.app/ Bundle size report
|
CodSpeed Instrumentation Performance ReportMerging #19779 will not alter performanceComparing Summary
Footnotes |
CodSpeed Instrumentation Performance ReportMerging #19779 will not alter performanceComparing Summary
|
material v2 call that "long press and drag" But it's not working on my mobile phone. I suspect the |
🤔 we could name it long press, but I suspect press is shorter and direct enough
Should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks clear. Effectively "long press" might be too long :)
pressAndDrag: { | ||
displayName: 'Press and drag', | ||
knob: 'switch', | ||
defaultValue: false, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dragThreshold: 10, | ||
dragTimeout: 1000, | ||
}), | ||
new PressAndDragGesture({ | ||
name: 'zoomPressAndDrag', | ||
dragThreshold: 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is their a reason why removingmaxDistance
to use the default vbalue and not doing the same with dragThreshold
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the other values were the default. The default dragThreshold
is 0
Fixes #18957
Similar to #19727
Changelog
The chart zoom now supports the
pressAndDrag
gesture. Pan by pressing and dragging.