0
votes

I want to create an drag and drop function within html5 canvas.

This is want I want:
http://jqueryui.com/draggable/

But in html5 canvas.

I have searched on the web, but only found drag and drop tutorials without droppable field

1
So, you have some elements you've drawn on the canvas, and want to drag those elements?Cerbrus
Yes, I want to check if it touches an other element.user1716690
Can you post the code you use to display the elements?Cerbrus
Just to rectangles with space between ituser1716690
You might want to look at kineticjsShmiddty

1 Answers

0
votes

To drag elements, you have to save the coordinates of the shapes you are drawing.

Here is a nice tutorial from simon sarris http://simonsarris.com/blog/510-making-html5-canvas-useful

There are different ways of doing this, but if you want something more specific, you'll have to explain us what you really want, or at least post some code. Good luck !