A
A
Alena2020-11-21 20:11:33
npm
Alena, 2020-11-21 20:11:33

How to make npm library handle onTouchStart which is not handled?

Hello. There is a library not written by me https://www.npmjs.com/package/react-3d-cube that creates a 3d cube and allows you to rotate it. The problem is that the cube can only be rotated on the desktop, while in the mobile version it remains static, as I understand it, because only onMouseDown, onMouseMove, onMouseLeave and onMouseUp are processed there, while Touch is not. And now the question, experts, how to make the onTouchStart event be processed as handleMouseDown, etc. by analogy? Maybe there are ways to rewrite the library, for example. Any suggestions are welcome. Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2020-11-21
@Aetae

There is a link to the github in the lower right corner. You go there, take the source code and rewrite it however you want.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question