Jump to content
Search Community

st3f

Members
  • Posts

    37
  • Joined

  • Last visited

Posts posted by st3f

  1. Hello, the last weeks I was using this CDN link

    <script src="https://cdn.jsdelivr.net/npm/gsap@3.0.1/dist/gsap.min.js"></script>

    then, today, I tried the 3.0.2

    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.0.2/gsap.min.js"></script>

    but nothing is working and I get this console errors...

     

    Any idea? What is the correct link to use? I am developing locally on a Xampp server.

     

    Thanks

     

    gsap3-error.jpg

  2. Hi,

    I've searched a bit but I didn't find a solution (bad search terms, probably).

    In this example, if I drag the div clicking outside the image (on the red background) everything is ok, but if I click on the contained image, I have this strange behaviour (image is like not part of the draggable div).

    What is wrong with my code?

     

    Thanks in advance

    See the Pen WNbQNXP by st3f (@st3f) on CodePen

    • Thanks 1
  3. Hi guys,

    about what we where saying these days with @Rick May @GreenSock @ZachSaucier and the super-kind @OSUblake, it's really difficult to talk about the difficulties I am having with the new Draggable if some simple code working on virtual servers, production servers and online, is not working on CodePen...

    Unless I added some extra ";" or I copied some whatever classes :)

     

    And, clearly, the problem is not to intercept an onClick, but working with parametric ids in a more complex machine.

     

    Thank you for any help

    See the Pen QWWXxGW by st3f (@st3f) on CodePen

  4. @GreenSock, it's really impossible to show a "demo" extrapolated from a demi/big app. it takes a lot of time and, in the same time, I'm working with deadlines etc.

    En bref, it could be very nice to tell Draggable who is the class that instantiated it (when you are using classes for almost everything).

    It's two days I'm using my free time (aka night) trying to copy some "whatever classes" on codepen but I don't understand the emulator and I have no time to study.

    Later today I will try to post an example. Bonne journée a tous :)

  5. Hi Zach,

    about my first question: I'm trying to obtain a more "magnetic" effect for the snap, and I thought the key was using:

    duration:{min:0.1, max:0.5},

    that I've found somewhere in the documentation, but clearly there is something I don't understand.

     

    About my second question, I will explain better another time :)

    Thanks

  6. Hi,

    I'm trying to make a "harder" Draggable movement. Meaning: if the user swipe very fast I don't want my container to scroll away to Mars. I have this in a class controlling my stuff

     

    this.dragg = Draggable.create(this.slidesInner, {
                type:"x",
                inertia:true,
                edgeResistance: 0.8,
                resistance: 0.75,
                duration:{min:0.1, max:0.5},
                snap: { x: this.snapX
                },
                onDrag:this.onUpdate,
                onThrowUpdate:this.onUpdate,
                onDragEnd:this.onDragEnd,
                callbackScope:this
            });

    But even changing resistance and duration I see no change. What am I doing wrong?

     

    And, more: it would be very nice to pass to the Draggable instance some custom property, like "parent" :) How can I achieve that ?

     

    Thank you

×
×
  • Create New...