You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/05/19 09:52:10 UTC
[GitHub] [echarts] kaihenzler commented on issue #10079: scroll event may prevent after use inside dataZoom
kaihenzler commented on issue #10079:
URL: https://github.com/apache/echarts/issues/10079#issuecomment-1131485632
I wanted to share my workaround for this issue.
- The basic idea is to disable zooming by setting `zoomLock: true`
- Add keyboard event listener to the `window` for `keyup` and `keydown`
- Alter the settings of the echarts instance by setting `zoomLock: false` while a specific key is pressed
- set `zoomLock: true` when the key is released again
This can be done with vanilla JS or any ui library.
Here you can see how it's done in Angular: https://stackblitz.com/edit/angular-ngx-echarts-qd5up4?file=src/app/app.component.ts
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org