-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
边连线有bug #9
Comments
这个没做限制 如果有需要可以自己加条件判断哦 |
嗯,谢谢,已修改,没有想到更好的方法 const edgesData = this.graph.save().edges
const uniq = edgesData.some((edge) => {
return isEqual(edge.start, model.start) && isEqual(edge.end, model.end)
})
if (!uniq) {
eventBus.$emit('addItem', model)
} 另外,想请教一下,如果拿画好的图的数据来渲染的话rend(data) 这里data.edges 是不是应该有targetAnchor,sourceAnchor字段来指定边连得是那个锚点 |
嗯 这个可以参考官方文档 |
是要指定targetAnchor,sourceAnchor 可以根据nodes edges算出来的 |
谢谢楼主,我尝试了一下用getLinkPointByAnchor方法把锚点与模拟(视觉)锚点坐标联系起来就ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
两个节点如果有连线,再连的话,表现上正常,打印出来的数据不对
The text was updated successfully, but these errors were encountered: