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

drag elements instead of drawing at cursor position? #35

Closed
gsabater opened this issue Aug 13, 2018 · 1 comment
Closed

drag elements instead of drawing at cursor position? #35

gsabater opened this issue Aug 13, 2018 · 1 comment

Comments

@gsabater
Copy link

Hello,

Nice library, i have spent all morning trying to learn and find what it has to offer, and while i find it very nice and capable of doing a lot of good work, i cannot find how to perform actions on drag.

Reading the guide i see that there is that thing called players in space that has a drag callback, and also in the docs i see that there is a pointeractions drag property, but for me is unclear how to use those methods to create something simple like for example a drag slider.

Also, could this library be used to retrict the movement or make the illusion of dragging a particle over a line, even if this line is diagonal?

Thanks

@williamngan
Copy link
Owner

Hi @gsabater , the UI module is now available in 0.6.0, and you can create a drag-drop element or button using its classes. Take a look at the demo here:

https://ptsjs.org/demo/?name=ui.track

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