-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
G6 5.x How to set the canvas position not to move after unfolding #6494
Comments
可以提供一下复现 demo 吗 |
import { Rect as GRect, Text as GText } from '@antv/g'; const style = document.createElement('style'); const COLORS = { class TreeNode extends Rect { get childrenData() { getLabelStyle(attributes) { getPriceStyle(attributes) { drawPriceShape(attributes, container) { getCurrencyStyle(attributes) { drawCurrencyShape(attributes, container) { getPercentStyle(attributes) { drawPercentShape(attributes, container) { getTriangleStyle(attributes) { drawTriangleShape(attributes, container) { getVariableStyle(attributes) { drawVariableShape(attributes, container) { getCollapseStyle(attributes) { drawCollapseShape(attributes, container) {
} getProcessBarStyle(attributes) { drawProcessBarShape(attributes, container) { getKeyStyle(attributes) { render(attributes = this.parsedAttributes, container) {
} register(ExtensionCategory.NODE, 'tree-node', TreeNode); fetch('https://assets.antv.antgroup.com/g6/decision-tree.json')
}); |
上面是官方给的示例: https://g6.antv.antgroup.com/examples/scene-case/default/#fund-flow |
graph.once(GraphEvent.AFTER_RENDER, () => { |
更新到 5.0.33 版本已解决 |
使用自定义节点展开折叠时,每次点击展开或折叠按钮,画布的位置都会平移一下,如果节点很多,画布移动导致刚刚点击的节点都找不到了,如何设置展开折叠后,画布还保持之前的位置不动?
The text was updated successfully, but these errors were encountered: