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

How to deal with touchstart - touchmove - touchend ? #66

Open
Kamoba opened this issue Aug 21, 2021 · 1 comment
Open

How to deal with touchstart - touchmove - touchend ? #66

Kamoba opened this issue Aug 21, 2021 · 1 comment

Comments

@Kamoba
Copy link

Kamoba commented Aug 21, 2021

I'm using it for drawing with mouse (draw.polyline()) on a TouchDevice (Window tablet) and it's not working, not geting the event mousedown and mouseup, so i replace them with touchstart and touchend but gor error:

Uncaught TypeError: SVGPoint.x setter: Value being assigned is not a finite floating-point value.

Code:

    draw.on('mousedown', event => { 
      const shape = getDrawObject();
      shapes[index] = shape;
      shape.draw(event);
    });

but work on pc.

@ayhanap
Copy link

ayhanap commented Jun 7, 2022

I was checking this too but as I understand current library doesn't support touch events. Because coordinates in touch events are at e.changedTouches[0].clientX instead of the current code which only uses e.clientX

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

No branches or pull requests

2 participants