Search the Community
Showing results for tags 'ondragend'.
I need to be able to get the position of the box or a way to know where the box moved and update the state. onDragEnd I can't pass the this.x for some reason, not sure if I'm missing anything. Here is the Demo: https://codesandbox.io/s/stoic-wood-zuyel?file=/src/Box.jsx
First of all, congrats for all stuff GSAP! This is a wonderful piece of work! Secondly, I've encountered issues with Draggable, while using React 16.5: Using Draggable.create(target) doesn't allow the user to drag the element at all. A 3d transform is set on the element, having all 0px values, but the element itself doesn't move. The onDrag / onDragEnd / onDragStart handlers aren't called. On the other hand, the onPress handler is called, but two times every click, once with a PointerEvent type event payload, and with a MouseEvent, the second time. Also, it's important to poin
Hi I am trying to get the x and y end point after a drag event. But the values are negative and dragging to the top left does not return 0,0 as one would expect. The values I am getting seem to be relative to the starting position of the dragged element, rather than absolute from the bounds container. You can see in the example if you move the box to the left and up the endX and endY are negative values, but I want the x and y values the box's position within the container. Am I doing something wrong or do I need to read in the starting position
Hi gang, Insert standard gushy comments about how great Greensock is...(cos it really is THAT good) I'm hoping there's something I've overlooked or that there's a quick and easy fix for what I'm seeing.... In my site I've encountered an issue with very quickly dragging objects with the mouse (in my limited test I don't think it was as much an issue on touch devices) onDragEnd I'd like to sometimes tween the dragged item back to it's original position (dependent on certain conditions) which works fine on most tests. However I noticed than when very quickly dragging and releasin