Jump to content
Search Community

Sean19

Members
  • Posts

    11
  • Joined

  • Last visited

Sean19's Achievements

0

Reputation

  1. Good Evening, I was wondering if there was a way to access the snap value in the draggable.create. When onThrowComplete finishes I would like to be able to access the x position of the element it snapped to. So if it snapped to 43, Id like to be able to access that number in the onthrowcomplete function. Thank you in advance. Draggable.create("#knob",{ type:"x", bounds: {left:140,top:0,width:870}, edgeResistance: .85, inertia: true, snap: [43,408,770], onThrowComplete:function(){ } });
  2. First I want to start by saying draggable is not working in the codepen. Not sure why. But that is not the reason I am here. I am able to run draggable on my local machine. The question I have is, I am trying to make draggable work dynamically. By this I mean, I want the #mix to drag to the position of the circle based on where the user drags it to and not an fixed value like I have. Also, I want to run onComplete and call a function once the #mix snaps into its position.
  3. Sean19

    Draw SVG

    Good Afternoon, I am trying to use the Drawsvg plugin and I am not sure why it is not working. I have read the docs and I would like to simply be able to control the SVG but for some reason whenever I load in the svg, I do not see any animation occur. I have added drawsvg to codepen to make sure I have access and I added a stroke and stroke width in css to ensure I was able to use the plugin. Any help is greatly appreciated.
  4. Sean19

    ScaleY Issue

    Thank you for the help. Exactly what I needed.
  5. Sean19

    ScaleY Issue

    Good Evening, What I am trying to achieve is when you hover over the red rectangle I would like the rectangle to grow upwards and then when you leave the shape, it goes back down. Right now I have been able to make the shape grow but it flips itself and grows past the bottom of the square. I simply want the rectangle to grow straight up to the top of the black square and then back down. Thank you in advance for your help!!!
  6. Sean19

    Spinning Square

    Thank you very much.
  7. Sean19

    Spinning Square

    Hello. In the codepen above, I am trying to be able to spin the square either to the left or the right depending on which button is clicked. For example: If I click the left button, I want the square to spin to the left by say 60 deg and if I click the left button again, it would spin to the left again by 60 deg, but if i click the right button I want the disc to spin to the right by 60 deg. Right now I have the square spinning to the left and right but it will not keep spinning if I continue to click. Thank you in advance for any help.
  8. Sean19

    Dynamic X position

    Thank you @ZachSaucier. This is exactly what I needed.
  9. Sean19

    Dynamic X position

    Hello. In the codepen I provided above I have it so that when a circle with the class of social is clicked, an alert is given with the x position of the circle. I did this because what I would like to do, is when a circle is clicked, I want the purple rectangle with id mix, to have its x position moved to under that circle. So for example, if the third circle is clicked, I want the purple rectangle to move x: 966. And then if the second one were clicked after that, I would want it to move back to the second one. Right now I just have the rectangle move x:200 so I can make sure I am selecting it properly. I was wondering if this was possible in GSAP.
  10. Sean19

    Negative Width

    Thank you so much @ZachSaucier. This is exactly what I needed. Works perfectly.
  11. Sean19

    Negative Width

    Hello. I am new to GSAP and have quick question. In the codepen I have provided I am trying to make it so one of the boxes (the black one) grows to the right, using the width property. I was able to do this. But now I would like the gold box to grow to the left by the same amount. I tried using the width property and using negative values but this did not work.
×
×
  • Create New...