Skip to content
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

[Feature]: 小地图(MiniMap)组件希望能在画布缩放时自动跟着缩放,或者提供一个方法来重置其大小 #1957

Open
EdwinOlders11 opened this issue Nov 11, 2024 · 0 comments · May be fixed by #1967

Comments

@EdwinOlders11
Copy link

背景&目的

有些场景下画布窗口会缩放,比如窗口被缩小了,或者画布父元素被缩小了,此时画布能显示的范围也变化了,但小地图并没有跟着变化,希望能自动缩放或者提供一个方法
比如下图,此时画布为正常大小,能显示全部的节点,小地图的范围也正常
屏幕截图 2024-11-11 143644
但在下图中,画布范围被压缩(并非覆盖),已经无法显示全部的节点,但小地图仍不变
image

admin1949 pushed a commit to admin1949/LogicFlow that referenced this issue Nov 13, 2024
使用ResizeObserver监听GraphModel中的rootEl大小变化,并新增抛出“graph:resize”事件,MiniMap监听“graph:resize”实现跟随缩放

Closes didi#1957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant