Jump to content
Search Community

Connecting to draggable elements with an unidirectional arrow/line

kryptonite test
Moderator Tag

Recommended Posts

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?

Link to comment
Share on other sites

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.

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