停止d3js上的强制布局并启动空闲拖动节点 [英] Stop Force Layout on d3js and start free dragging nodes

查看:536
本文介绍了停止d3js上的强制布局并启动空闲拖动节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用强制布局来表示定向未加权网络。我的灵感来自以下示例:



http://bl.ocks.org/norrs/2883411


I'm using the force layout to represent a directed unweighted network. My inspiration comes from the following example: http://bl.ocks.org/mbostock/1153292

Since my own data are really a mess, I'd like to stop the layout and move nodes by dragging them manually. I'd also like that the movement of a node doesn't change the position of others. And it's necessary that links become longer, to reach the node which has been moved.

Is there a simple way to do this?

解决方案

At the end I found this related question which implements a solution which I'll adopt.

d3.js force directed graph with support for drag and drop to make selected node position fixed when dropped

http://bl.ocks.org/norrs/2883411

这篇关于停止d3js上的强制布局并启动空闲拖动节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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