Closed senthilkumarpn closed 9 years ago
This is possible if you use the methods documented at http://interactjs.io/docs/ and http://interactjs.io/api/ and add code to perform your desired response to drop
or dragend
events.
Thanks for your comment. and i fixed the snapping. i'm facing performance issue on ie11 windows 8. below is my dragMove code and the same works smoothly in iOs 8 without any performance issue. altimately my goal is to drag & drop three Obj concurrently. sometimes it can not be drag while i drag little bit faster on ie11.
Is there any way to optimize on IE and to restart the draggables incase if it is struck at somewhere.
sample jsFiddle link: http://jsfiddle.net/senthilkumarpn/37y1kzxb/
function dragMoveListener (event) { var target = event.target, x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx, y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy; target.style.webkitTransform = target.style.transform ='translate(' + x + 'px, ' + y + 'px)'; target.setAttribute('data-x', x); target.setAttribute('data-y', y);
}
Is there any way to optimize on IE
I don't know.
and to restart the draggables incase if it is struck at somewhere.
The API doesn't provide a way to do that. You would need to implement that yourself.
Hi Taye,
this is related to the post
https://github.com/taye/interact.js/issues/79
i would need to set if 50% drag Element overlap on dropZone, then i need to place the element inside the dropzone relative to the current position (not to snap to center). thanks in advance. untitled
Your quick reply will be much helpfull for me