relation-graph icon indicating copy to clipboard operation
relation-graph copied to clipboard

文档缺少 zoom() 方法

Open StephenKe opened this issue 3 years ago • 2 comments

在源码里能找到 zoom 方法,也能调用,文档里却没有写 graph 对象下有 zoom 方法

StephenKe avatar Jun 11 '21 00:06 StephenKe

看了你的答复,我去找了下源码,更改了点击按钮每次缩放20的比例,很稳,老哥

WindChimeBell avatar Jun 11 '21 09:06 WindChimeBell

看了你的答复,我去找了下源码,更改了点击按钮每次缩放20的比例,很稳,老哥

WindChimeBell avatar Jun 11 '21 09:06 WindChimeBell

之前没有开放出来是还没有想好要开放的方式,比如v1中的使用方式是this.$refs.graph.zoom() 现在在新版v2.x中已经可以使用,但使用方式是this.$refs.graph.getInstance().zoom()

后续会补充文档,会和其他很多方法一起开放出来,用来支持强交互需求场景。 比如this.$refs.graph.getInstance().animateToZoom(finalZoom, time, callback),这个方法可以以动画的方式缩放到指定的比例finalZoom(100表示100%) 后续的文档地址将会是:https://seeksdream.github.io/#/demo/instance-api

seeksdream avatar Dec 31 '22 09:12 seeksdream