How to drag and drop a image in dojo?

218 Views Asked by At

I'm drawing the images through GFX API of DOJO

var img = grid.createImage({
                    x : z,
                    y : 75,
                    width : 60,
                    height : 60,
                    src : 'images/' + image
                });

They are static images now, is their a way to drag it and drop it in DOJO

1

There are 1 best solutions below

0
On

Have a look here:

http://dojotoolkit.org/reference-guide/1.10/dojo/dnd/Moveable.html

The dojo/dnd/Moveable makes a Domnode, in your case an image, movable. Theres a good example, explaining how to work with it.

Check it out.

Regards,Miriam