用线连接两个可拖动的div [英] Join two draggable divs with lines

查看:75
本文介绍了用线连接两个可拖动的div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我想通过拖动鼠标将两个不同的表行与行连接起来.这些表格位于可拖动的div中.需要您的帮助.
谢谢.

Hello,

I want to join two different table rows with lines by dragging mouse. and these tables are inside the draggable div. Need your help.
Thank you.

推荐答案

<pre lang="cs">var endpointOptions = { isSource:true, isTarget:true };
var div1Endpoint = jsPlumb.addEndpoint('div1', { anchor:"TopCenter" }, endpointOptions );
var div2Endpoint = jsPlumb.addEndpoint('div2', { anchor:"BottomCenter" }, endpointOptions );
jsPlumb.connect({
    source:div1Endpoint,
    target:div2Endpoint,
    connector: [ "Bezier", 175 ],
    paintStyle:{ lineWidth:5, strokeStyle:'red' }
});



这篇关于用线连接两个可拖动的div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆