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

Fixing issue with no legend showing for touch events. #723

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kbaggott
Copy link
Collaborator

@kbaggott kbaggott commented Feb 1, 2016

Hi,
I have been using your library for a while and am now using it on some mobile projects and noticed issue #400 and thought it was something I am going to run into soon.
Had a quick think about it and I believe this pull request would fix the issue satisfactorily, the only thing I don't like is the test inside the .pageY and .pageX functions as they were very clean, but I can't see another way of doing it without entering more of the functions associated with the lookup of the coords. So I haven't written any tests for it and welcome your opinion first.
Thanks for all your work on this, it's a great library.

Saving the lastTouch and looking to see if other functions wipe it before passing a special param to tell the other functions that it's a touchOVER.
Adding touchOVER check to the pageX/Y as it only exists under touches for touch events.
In testing on different devices it seems changedTouches is better supported cross platform, using this instead of the the touches object. 
Roughly tested on iOS and Android.
adrianiainlam added a commit to adrianiainlam/dygraphs that referenced this pull request Jul 31, 2018
This merges changes by @kbaggott in danvk/dygraphs PR danvk#723,
to allow points to be selected (and thus legends to show up)
on touchscreens.
Shinbar pushed a commit to Shinbar/dygraphs that referenced this pull request Apr 13, 2020
on touch enabled devices.  Based off danvk#723 by kbaggot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant