GGEditor icon indicating copy to clipboard operation
GGEditor copied to clipboard

graph.focus()

Open xiaofengqqcom123 opened this issue 5 years ago • 1 comments

版本

[email protected]

环境

React : [email protected]

重现步骤

调用 graph.focus(focusId)方法 第一次进入页面时,不是默认居中,等页面渲染完才居中,有卡顿效果

 if (flow && flow.current) {
    const { graph } = flow.current
    if (props.focusId) {
      graph.focus(props.focusId)
    }
  }

期望的结果

第一次进入页面,就居中

xiaofengqqcom123 avatar Jan 16 '20 12:01 xiaofengqqcom123

可在init时,进行fitView: true?

zhoustudent avatar Aug 03 '20 10:08 zhoustudent