Jump to content
Search Community

KIDS interactive

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by KIDS interactive

  1. 22 hours ago, Nekiy2 said:

    What about check isPassed and if it passed - do something 
    Or you can create public method and check it yourClass.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 ?

  2. 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.

  3. 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?

  4. 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

×
×
  • Create New...