[solved]touch event error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

[solved]touch event error

Why when I print event.clientY or event.ClientX does it print an undefined value?. Help me please.Thanks https://code.sololearn.com/WAn5W9R6Sj5T/?ref=app

28th Jul 2020, 1:05 AM
Emanuel Maliaño
Emanuel Maliaño - avatar
7 Answers
+ 7
event.touches[0].clientX Touch events keep track of multiple touches. You're welcome.
28th Jul 2020, 1:22 AM
Kevin ★
+ 7
Emanuel Maliaño as funny as this may seem I changed line 28 to path(clip, m.x. m); and your error disappeared and the code worked fine... but I would follow what Calviղ did.
28th Jul 2020, 2:05 AM
BroFar
BroFar - avatar
28th Jul 2020, 1:42 AM
Calviղ
Calviղ - avatar
+ 3
Emanuel Maliaño BroFar The code has no problem with mousemove event, but the the event call the path function path(clip, m.x. m.y); has syntax error. It should be path(clip, m.x, m.y);
28th Jul 2020, 5:26 AM
Calviղ
Calviղ - avatar
+ 2
BroFar 😳😁 I think the error appears when the mousemove event occurs but I'm not sure about it, Calviղ what it did was delete that event and the error disappeared but if you don't delete that event and just click on the screen you get an error.
28th Jul 2020, 2:12 AM
Emanuel Maliaño
Emanuel Maliaño - avatar
+ 2
✌😅fixed
28th Jul 2020, 7:20 AM
Emanuel Maliaño
Emanuel Maliaño - avatar
+ 1
Kevin ★ thanks man
28th Jul 2020, 1:25 AM
Emanuel Maliaño
Emanuel Maliaño - avatar