开发者

Div positioning on a canvas with arrows bindings

开发者 https://www.devze.com 2022-12-25 04:18 出处:网络
I\'m searching for a little piece of javascript that can atta开发者_开发问答ch to a div (in data-x data-y attributes for example) the x,y coordinates of a draggable div. And then be able to draw arrow

I'm searching for a little piece of javascript that can atta开发者_开发问答ch to a div (in data-x data-y attributes for example) the x,y coordinates of a draggable div. And then be able to draw arrows between them (using a data-targetid attribute?).

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


There is a jQuery version of jsPlumb, looks like it's 14kb. What you're trying to do isn't default functionality, you're going to need a (somewhat complicated) library to accomplish it. If you're concerned with code bloat I'd start with the source code of jsPlumb and start pulling out what you don't need.

0

精彩评论

暂无评论...
验证码 换一张
取 消