Jump to content

Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

About fionchadd

Profile Information

  • Gender
  • Location
    London, UK

fionchadd's Achievements

  1. Hi Cassie, Ah that's perfect, thanks so much for your help! Hannah
  2. Hi there, I have another question about my tortoise I'm afraid! I'm trying to rewrite the current code to be better, as it's a bit of a mess at the moment, and I've run into an issue. When changing the colour of the shell, originally I had the shell colour change function inside the 'change input' function, which was working fine - you can see that in a pen here: https://codepen.io/fionchadd/pen/dyRrNKr What I'm trying to do now is set up the colour changes as timelines, and then start the relevant timeline when the input changes. That's in a codepen here: https://codepen.io/fionchadd/pen/WNOmROw The issue I'm having is that between certain colour changes, the shell changes back to a previous state rather than going from the current colour to the new colour, and I'm not sure why. For example, if you click 'multi' it changes to multicoloured, but if you then click 'green' it turns red before going green. If you then click 'multi' again it turns blue before going multicoloured. Am I doing something wrong in the way I'm calling the timelines? I tried using play(0) rather than restart() but it didn't seem to help. Thanks! Hannah
  3. Hi OSUblake, Thank-you so much, this is *perfect*! And so much simpler than what I was trying to do. Thanks for the heads-up on getProperty as well! I'm very grateful Hannah
  4. Hi there, I'm trying to give my tortoise a hat using Draggable and I'm really struggling to get the behaviour I want. The ideal behaviour is that if the hat overlaps the dropzone (outlined in red) when the user releases the mouse, it snaps to the center of the dropzone. Otherwise it falls to the ground. Falling to the ground is working fine, but I can't get it to snap to the center of the dropzone. I found a few codepens / threads on the forums with similar requests, but they either use a left/top drag or absolute positioning; my elements are part of an SVG so I'm unable to use those methods. What I'm doing at the moment is getting the left and top position of the dropzone, then on drag end getting the left and top position of the hat, the distance between that and the dropzone, and the current X and Y values of the hat. Then I'm adding half of the distance to the current X and Y values and tweening to that. It seems to get fairly close on certain screen sizes, but it doesn't seem to be a responsive solution and although it is tweening, it doesn't seem to be tweening to the exact center of the dropzone. I realise this isn't really a "how do I use draggable" question so I totally understand if it's beyond the scope of support that you offer, but if you have any similar examples you can point me towards I'd be very grateful! Hannah
  5. Hi Jack, ah that’s amazing, thanks so much for the advice! I’m still pretty new to gsap so that’s super helpful to know. Also cant believe I found a real life bug lol, I was convinced I was doing something wrong 😅 thanks for your help! hannah
  6. Hi there, I'm trying to work with Draggable at the moment and I'm having an issue with the snap function. I'm trying to get the item to return to its original position after it's been thrown; currently the snap value seems to be affecting the X value but not the Y value and I'm not really sure why? Any advice you can give would be greatly appreciated! Thanks Hannah