Jump to content
Search Community

Connecting to draggable elements with an unidirectional arrow/line

kryptonite

Recommended Posts

Posted

I want to create draggable div that can be connected to each other by an arrow/line. And the arrow should expand/contract as the two div are moved. I can implement the draggable part but I cannot understand how to connect them. Please help. 

Example : https://idflood.github.io/ThreeNodes.js/index_optimized.html#example/rotating_cube1.json

 Also I want to be able to remove the arrows when required. Similarly if I remove one the draggable divs, all the lines connected to it should be removed. Is this possible using GSAP plugins?

ZachSaucier
Posted

Hey kryptonite and welcome to the GreenSock forums.

 

GreenSock tweeted about how to make this sort of thing and some similar ideas:

 

  • Like 1
Posted
17 hours ago, ZachSaucier said:

Hey kryptonite and welcome to the GreenSock forums.

 

GreenSock tweeted about how to make this sort of thing and some similar ideas:

 

Hey @ZachSaucier,thanks for the reply. I have gone through the post however they are a bit difficult to understand and also outdated as many of the functions have been deprecated since. Also my divs are created dynamically unlike the ones shown in the post so I am not sure how to implement this.

Posted

@kryptonite The vast majority of the methods totally work in v3. For the very few that don't, there's a migration guide here:

 

 

If you have any GSAP-specific questions, we'd be happy to help, especially if you provide a minimal demo?

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