Skip to content

边上右键打开菜单后如何知道 distance 值? #3815

Answered by NewByVector
hylerrix asked this question in Q&A
Discussion options

You must be logged in to vote

可以使用以下 API 获取在连线上距离 (x、y)最近的一个点距离起点的 distance。

const view = graph.findViewByCell(edge) as EdgeView
const distance = view.getClosestPointLength({ x, y })

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hylerrix
Comment options

Answer selected by hylerrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants