zoom/pan choppy on touch device
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
While zooming/panning works flawlessly with d3.behavior.zoom itself (e.g. in http://bl.ocks.org/mbostock/3892928) [at least on my Android 4.3 Chrome browser], it works very choppy in c3 (e.g. in http://c3js.org/samples/interaction_zoom.html).
The chart responds badly to touches, often it will not pan at all if the chart is dragged, or only a small bit, using pinch zoom often triggers the browser resize/shrink of the complete website instead of zooming the chart.
I don't know if this is at least partly a result of #1299 not calling _$$.redrawEventRect();_ and
_$$.updateZoom();_.
But debugging showed that the behaviors "zoomend" (https://github.com/masayuki0812/c3/blob/master/src/zoom.js#L13) is often **not** triggered when dragging the chart via touch, only "zoom" on https://github.com/masayuki0812/c3/blob/master/src/zoom.js#L10 is called, thus updating the chart correctly with _redrawForZoom()_, so the cause is probably something else.
Contributor guide
Assessment
This issue has not been assessed yet.