Any hints on how to drag-and-drop an image? #1984
cclauss
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
Chris laffra's ltk handles this well.
I have recently also implemented my own more specific dragndrop in SVG using mousedown/move/leave events and keeping track of offsets using global variables. Here is a good reference: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Does not work on an iPad. I got dnd working in https://cclauss.pyscriptapps.com/click-and-drag-event and domino but I need more time to get it to mesh into gameplay. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://pyscript.com/@cclauss/domino is my attempt to drag and drop an image in pyscript.
How can I detect if the user has clicked on the image and how can I move that image to allow the user to drag and drop it?
The Tic-Tac-Toe demo has a
.click()
method but I cannot figure out how to enable that method on this image.I was only able to find @Neon22's comments on
dnd
at #1687 (comment)Beta Was this translation helpful? Give feedback.
All reactions