Draw an arrow between two divs

后端 未结 5 900
不思量自难忘°
不思量自难忘° 2021-01-31 02:45

I\'m searching for a solution of the question that I expected to be solved already. But I saw only big projects with a lot of features but no simple solution.

Actually I

5条回答
  •  时光取名叫无心
    2021-01-31 03:34

    Canvas and jCanvas

    Based on your needs, you should definitely check out using Canvas and the jCanvas library. It makes things like this a breeze.

    I ventured down the road of doing everything with DIVs and jQuery but it always fell short on interactivity and quality. This really kicks open the doors without adding code complexity.

    Hope that helps others, like me.

    JP

    EDIT 2017 05 20:

    I used to have an example here that linked to the jCanvas' sandbox with all the code you needed to draw an arrow between two elements and drag both of those elements around the canvas. However, that link no longer works and I don't have the code anywhere else.

    So, I still think you should check out jCanvas but unfortunately I don't have any sample code to start you off.

提交回复
热议问题