antvis / F6

F6 is a graph visualization engine which provides quick and smooth operations on mobile devices.
https://f6.antv.vision
MIT License
133 stars 21 forks source link

微信小程序中,根节点定位到到画布中心问题 #129

Closed WenHua39 closed 2 years ago

WenHua39 commented 2 years ago

pc中 graph.node获取根节点的x,y值,使用graph.moveTo(x, y)可以移动画布使画布中心与根节点位置重合, 微信小程序中pixelRatio的存在,要怎么使画布中心与根节点位置重合呢?graph.translate或者graph.moveTo的x, y值应该是如何计算呢?