@@ -212,9 +212,9 @@ export default class ChartAdapterStore {
212
212
}
213
213
214
214
window . flutterChartElement ?. addEventListener ( 'wheel' , this . onWheel , { capture : true } ) ;
215
- window . flutterChartElement ?. addEventListener ( 'touchstart' , this . onTouch , { capture : true } ) ;
216
- window . flutterChartElement ?. addEventListener ( 'touchmove' , this . onTouch , { capture : true } ) ;
217
- window . flutterChartElement ?. addEventListener ( 'touchend' , this . onTouch , { capture : true } ) ;
215
+ window . addEventListener ( 'touchstart' , this . onTouch , { capture : true } ) ;
216
+ window . addEventListener ( 'touchmove' , this . onTouch , { capture : true } ) ;
217
+ window . addEventListener ( 'touchend' , this . onTouch , { capture : true } ) ;
218
218
window . flutterChartElement ?. addEventListener ( 'dblclick' , this . onDoubleClick , { capture : true } ) ;
219
219
window . addEventListener ( 'mousemove' , this . onMouseMove , { capture : true } ) ;
220
220
}
@@ -223,9 +223,9 @@ export default class ChartAdapterStore {
223
223
window . _flutter . initState . isMounted = false ;
224
224
225
225
window . flutterChartElement ?. removeEventListener ( 'wheel' , this . onWheel , { capture : true } ) ;
226
- window . flutterChartElement ?. removeEventListener ( 'touchstart' , this . onTouch , { capture : true } ) ;
227
- window . flutterChartElement ?. removeEventListener ( 'touchmove' , this . onTouch , { capture : true } ) ;
228
- window . flutterChartElement ?. removeEventListener ( 'touchend' , this . onTouch , { capture : true } ) ;
226
+ window . removeEventListener ( 'touchstart' , this . onTouch , { capture : true } ) ;
227
+ window . removeEventListener ( 'touchmove' , this . onTouch , { capture : true } ) ;
228
+ window . removeEventListener ( 'touchend' , this . onTouch , { capture : true } ) ;
229
229
window . flutterChartElement ?. removeEventListener ( 'dblclick' , this . onDoubleClick , { capture : true } ) ;
230
230
window . removeEventListener ( 'mousemove' , this . onMouseMove , { capture : true } ) ;
231
231
clearTimeout ( this . enableVerticalScrollTimer ) ;
@@ -286,11 +286,10 @@ export default class ChartAdapterStore {
286
286
const deltaX = e . type === 'touchend' ? Math . abs ( deltaXTotal ) : Math . abs ( xDiff ) ;
287
287
const deltaY = e . type === 'touchend' ? Math . abs ( deltaYTotal ) : Math . abs ( yDiff ) ;
288
288
const isVerticalScroll = deltaY > deltaX ;
289
- this . touchValues = isVerticalScroll ? { ...this . touchValues , deltaXTotal, deltaYTotal } : { } ;
289
+ this . touchValues = { ...this . touchValues , deltaXTotal, deltaYTotal } ;
290
290
291
- if ( ! isVerticalScroll ) return ;
292
-
293
- if ( isForcedScrollArea ) {
291
+ if ( isForcedScrollArea && isVerticalScroll ) {
292
+ e . stopPropagation ( ) ;
294
293
if ( shouldForceMaxScroll ) {
295
294
clearTimeout ( this . scrollChartParentOnTouchTimer ) ;
296
295
this . scrollableChartParent ?. scrollTo ( {
0 commit comments