jsPlumb source endpoint does not move when source container is dragged

让人想犯罪 __ 提交于 2019-12-01 08:59:51

To update connections of child(DIV) elements you need to make use of customised jQuery draggable instead of jsPlumb.draggable. Here is the customised jQuery draggable for your code:

newAgent.draggable({
        containment: 'parent',
        drag:function(e){
            $(this).find('._jsPlumb_endpoint_anchor_').each(function(i,e){ 
                if($(e).hasClass("connect"))
                    jsPlumb.repaint($(e).parent());
                else
                    jsPlumb.repaint($(e));
            });                                     
        }
    });

Updated Fiddle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!