Ayaf Noneym
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Ayaf Noneym
-
-
I have an unordered list of items, I am also appending more items in the respective list dynamically. As you can see in the below example that the drag only working on click (because I made it to do so). Is there any way to use event delegation without adding
eventListener
.Note - I am using
event delegation
because I am dynamically appending elements in the list.See the Pen LYeyYVv by NikalLawde (@NikalLawde) on CodePen
-
Thanks for the suggestion!! It helps!
-
I got the bounce effect as I wanted. But there is something more I want to know, How can I trigger an animation only if we leave drag from a certain directions i.e I have an animation I want it to occur only if I left dragging from left direction.
See the Pen PoOeYba by NikalLawde (@NikalLawde) on CodePen
As you can see above the animation is occuring both time even I leave the drag from right direction or left direction.
-
Thanks for the solution!! But just a minor problem, even after tweaking some values I am still not getting the good bounce effect. Can you also adjust that too?? Thanks in advance for that also.
-
the
onDragEnd
function is not working? Also what I want to achieve is that I want to prevent dragging inleft
as well as inright
direction with animation or specifically with slight bounce animation. If I am not usingbounds
prop everything is working just fine.See the Pen zYPWWPj by NikalLawde (@NikalLawde) on CodePen
onDragEnd() is setting defined x position but without transition.
in GSAP
Posted
I am trying to make something like thisI want to set specific position of
x
if value of drag onx axis
is greater than definednumber
everything is working just fine but without transition or I can say withoutbounceEffect
.Additionally I also want to reset position of draggable element on
focusLost
See the Pen zYPWWPj by NikalLawde (@NikalLawde) on CodePen