Jump to content
Search Community

Dragging and Dropping an SVG line

eranariel test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts


I am new to gsap . 

How do I set the  SVG  to correspond with the path coordinates ? Extruding (drag/drop) the line/path to a new position is  constrained from view by the width and height of the <svg> . I would like to connect the line endings  (circle classes) to other elements as drag and drop. 


See the codepen link, and tons of thanks in advance! 


See the Pen mdmQOBX by aran-ariel (@aran-ariel) on CodePen

Link to comment
Share on other sites

On 8/7/2021 at 11:21 PM, OSUblake said:

/ old element._gsTransform.x // new gsap.getProperty(element, "x")


I have updated the code, however the line no longer appears . If I remove the TweenMax  script source,  the circles (endings) are no longer draggable, accordingly it is unclear where the code is referencing it.   If you could please have a look at the code, it would be greatly appreciated, thanks!






Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...