KIDS interactive
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by KIDS interactive
-
-
22 hours ago, Nekiy2 said:
What about check isPassed and if it passed - do something
Or you can create public method and check ityourClass.isPassed() // return true/false
The problem is, that the `onDragStart`, `onDragEnd` and `onDrag` are binded by the class. I can't modify them in any way. I can't modify the Draggable creation.
The only thing i get is the instance of the object, with the dragInstance, on drag-start and on drag end.
---On 10/2/2020 at 8:18 PM, GreenSock said:As a performance optimization, Draggable checks when each onPress occurs to see if there's a drag listener so that (if not) it can skip some expensive logic on every move of the pointer. It looks like you're trying to add a drag even listener WHILE it's dragging (after the onPress), so that check has already happened for that drag
Okay i see this point. But why it is working on the second try and afterwards ?
-
the dragInstance is created from another Class. I couln't modify the creation of the instance. The only thing i can get is the firing of an extra event of dragstart / dragend where the instance of the object is passed.
So i have to bind my drag-listener afterwards.And it works after the second dragStart. Just on the first dragStart it doesn't work.
-
Thanks for your help guys, but i explicit need to create a new listener each time. The main-problem is more complex and the codepen shows just the main-cause.
Anyway for me it is a bug that it wouldn't work on the first time, but always afterwards. Any other ideas how to solve it? -
-
Yeah that works but isn't possible in my use-case. So hopefully a absolute-parent will be possible soon
Thanks for your effort! -
See the Pen mdyRNJN by MaqsYo (@MaqsYo) on CodePen
So here we have a codepen ?
Your information helped a lot to reproduce it.
If you inspect the blue bubble it has left 0% and top 0%.I found out, that the outline doesn't have a width and height at this moment. If it has before im setting left and top everything is okay.
-
Hey guys!
I have one case where the left and top value are setted false in my project. I tried to reproduce it in codepen but i couldn't.gsap.set(rotateScaleHandle, { top: '50%', left: '50%' });
This code set's the top and left value to
0%
Values without units or with 'px' are setted correctly.
Is there a case where gsap resets the percentage-values to zero ?
PS: I'll give it a try on codepen again
GSAP 3.x Error with Draggable Event Binding
in GSAP
Posted
Forget it.. i was to dumb to read correctly. `OnPressInit` helps a lot.
---
Could be closed