缩放画布之后,如何保存画布的位置,重绘时回到原本的位置 #7529
Unanswered
WebGeniusLT
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
当前使用的g6版本未5.0.49,当缩放了画布,并且拖动画布之后,通过2个方法保留了缩放比例(graph.getZoom())和画布的位置(graph.getPosition()),重绘时使用了await graph.zoomTo(zoom); graph.translanteTo([x, y]); 但没有恢复到保存时的位置,并且偏差比较大
Beta Was this translation helpful? Give feedback.
All reactions