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

velocityX/Y is NaN #46

Open
Draeli opened this issue Jul 14, 2018 · 0 comments
Open

velocityX/Y is NaN #46

Draeli opened this issue Jul 14, 2018 · 0 comments

Comments

@Draeli
Copy link

Draeli commented Jul 14, 2018

I was trying to use your other plugin "jquery.event.swipe.js" and find velocityX/Y return "NaN".
Digging more, I come inside "jquery.event.move.js" and find when "updateEvent" is call, "timeStamp" is undefined and has side effect to false all calculation after about velocity.
Digging again, I was trying to solve this adding "timeStamp" on "event" (inside "movestart" function) but browser throw a "TypeError: setting getter-only property "timeStamp" (which is not a surprise).

In desperation, I corrected by setting a new parameter to "updateEvent" :
function updateEvent(event, touch, timeStamp, eTimeStamp) {
and for the call :
updateEvent(event, data.touch, data.timeStamp, e.timeStamp);

I'm sure this is not the best solution but at least it does the job ^^

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

1 participant