alibaba / butterfly

🦋Butterfly,A JavaScript/React/Vue2 Diagramming library which concentrate on flow layout field. (基于JavaScript/React/Vue2的流程图组件)
https://butterfly-dag.gitee.io/butterfly-dag/home
MIT License
4.48k stars 603 forks source link

focusCenter without animation #936

Open JensWinkler91 opened 1 year ago

JensWinkler91 commented 1 year ago

What problem does this feature solve?

I'd like to center all my nodes and groups after my application starts without animation. E.g. i want to center the canvas before i create an image of the canvas. Therefore i'd like to display the canvas in a dialog. All the nodes and groups should be centered initially.

Is there any possiblity to do this?

I couldn't find anything in the docs.

Thanks in advance.

noonnightstorm commented 1 year ago

We support it in 5.1.0-beta.32 , but not in 4.x. options.animate = false

JensWinkler91 commented 1 year ago

Thanks. I just tried it.

My diagram is still moving to the center. The thing that changed is that it's not moving smooth anymore.

I also figured out that with 5.1.0-beta.32 the Arrow().registerArrow function is not working anymore.