Skip to content
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

Dragging on touch starts too late (ontouchend) – with video #98

Closed
wahlatlas opened this issue Jul 7, 2023 · 6 comments
Closed

Dragging on touch starts too late (ontouchend) – with video #98

wahlatlas opened this issue Jul 7, 2023 · 6 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@wahlatlas
Copy link

Dragging/Panning the map on a current iPad pro running iOS 16.5.1 I experience the following – even without WMS background layer:

  • the map only moves after I am ending the drag with a touch end

Will post a video of the observed behaviour versus the expected one.

@wahlatlas
Copy link
Author

Have a look at this 19sec video that demonstrates the issue
https://wahlatlas.net/experimente/testcases/gridviz_drag_touch_issue98.mp4

@wahlatlas
Copy link
Author

Here's a reduced testcase:
https://wahlatlas.net/experimente/testcases/gridviz_issue98.html

The above described unexpected behaviour should be able to be reproduced on an iPad.

However, if I first touch until the tooltip shows and than touch again the same – now highlighted – cell, the drag works as expected

drag

@wahlatlas
Copy link
Author

wahlatlas commented Jul 7, 2023

The WebGLStyle doesn’t exhibit the described issue, dragging on touch is instant as it should, see
https://wahlatlas.net/experimente/testcases/gridviz_issue98WGLStyle.html

@joewdavies joewdavies added the bug Something isn't working label Jul 10, 2023
@joewdavies joewdavies self-assigned this Jul 10, 2023
@joewdavies
Copy link
Collaborator

For some reason...

CanvasRenderingContext2D.drawImage()

...updates the canvas during desktop pan events, but not on mobile.

this.ctx.drawImage(this.canvasSave.c, this.canvasSave.dx, this.canvasSave.dy)

I've tried to fix it but no luck so far.

I will keep investigating!

@joewdavies joewdavies added the help wanted Extra attention is needed label Nov 24, 2024
@joewdavies
Copy link
Collaborator

For some reason this issue doesnt happen for me (on android) when the viewport meta tag is omitted from the HTML document head:
<meta name="viewport" content="width=device-width, initial-scale=1" />

On mobile:

This works: https://eurostat.github.io/gridviz/examples/styles/joyplot_shading.html (without tag)
This doesnt: https://eurostat.github.io/gridviz/examples/styles/joyplot.html (with tag)

Of course by removing the meta tag, the zoom buttons and placenames are not scaled correctly so this is not a solution.

Im not yet sure why this affects the panning and zooming. And why it works well with webgl but not with 2D canvas.
The investigation continues!

@joewdavies
Copy link
Collaborator

This issue appears to be solved as of v3.0.17. (tested on android)
@wahlatlas please let us know if you still encounter the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants