javascript - Get Position of Drag & Drop Element -


i using following code: http://www.html5canvastutorials.com/kineticjs/html5-canvas-drag-and-drop-a-group-with-kineticjs/ drag & drop.

my question is: how can actual position (x,y) of group after being dragged , dropped?

you can use events of kinetic objects - http://www.html5canvastutorials.com/kineticjs/html5-canvas-path-mouseover/ in case - 'dragend'.

group.on('dragend',function(){     console.log(group.getposition()); }); 

example: http://jsfiddle.net/lavrton/xesdz/


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -