Div layout on canvas with arrow bindings

I am looking for a small piece of javascript that can join a div (in the data-x attributes of data-y, for example), the x, y coordinates of the draggable div. And then you can draw arrows between them (using the data-targetid attribute?).

If the solution can look like a simple version of graphview , jsPlumb or vizster , but without a complex library and only in javascript / html

+4
source share
1 answer

There is a jQuery version of jsPlumb that looks like 14kb. What you are trying to do is not the default functionality, you will need a (somewhat complex) library to execute it. If you are worried about bloating the code, I would start with the jsPlumb source code and start pulling out what you don't need.

+1
source

Source: https://habr.com/ru/post/1305808/


All Articles