File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
packages/x-charts-pro/src/internals/plugins/useChartProZoom/gestureHooks Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -56,11 +56,11 @@ export const usePanOnDrag = (
5656 const handlePanStart = ( event : PanEvent ) => {
5757 if ( ! ( event . detail . target as SVGElement ) ?. closest ( '[data-charts-zoom-slider]' ) ) {
5858 isInteracting . current = true ;
59+ accumulatedChange . current = { x : 0 , y : 0 } ;
5960 }
6061 } ;
6162 const handlePanEnd = ( ) => {
6263 isInteracting . current = false ;
63- accumulatedChange . current = { x : 0 , y : 0 } ;
6464 } ;
6565
6666 const throttledCallback = rafThrottle ( ( ) => {
Original file line number Diff line number Diff line change @@ -56,12 +56,12 @@ export const usePanOnPressAndDrag = (
5656 const handlePressAndDragStart = ( event : PressAndDragEvent ) => {
5757 if ( ! ( event . detail . target as SVGElement ) ?. closest ( '[data-charts-zoom-slider]' ) ) {
5858 isInteracting . current = true ;
59+ accumulatedChange . current = { x : 0 , y : 0 } ;
5960 }
6061 } ;
6162
6263 const handlePressAndDragEnd = ( ) => {
6364 isInteracting . current = false ;
64- accumulatedChange . current = { x : 0 , y : 0 } ;
6565 } ;
6666
6767 const throttledCallback = rafThrottle ( ( ) => {
You can’t perform that action at this time.
0 commit comments