-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
能否支持动态显隐小地图? #3784
Comments
👋 @sh4wmoo Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. |
|
1.css隐藏小地图没问题,问题的初衷是”时机“。 |
判断的逻辑就是计算所有节点的坐标是否在可视区域内部,大致代码: const nodes = graph.getNodes()
const allInView = nodes.every((node) => {
return node.getBBox().intersectsWithRect(graph.getGraphArea())
}) 不过你上面也说了,后面会有很多操作会改变上面结果,所以你需要监听 |
好的 我先按照这种方式试一下。 |
这个方案被否定了,暂时不考虑这个需求。还有个问题请问一下,issue#3778的,我看到已经对vertices tool进行了完善,增加了[modifiers]。那么请问有没有发布计划?何时才能发布到NPM上? |
@sh4wmoo 已经发布了哈。 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
问题描述
个人认为小地图的初衷,应该是在用户无法完整的看到所有元素的情况下才需要的。那么能否支持提供一个参数,来根据当前画布与元素的容纳情况,来动态显隐小地图?
退而求其次:
根据上述api可以直接设置容纳所有元素。
请问能否提供API可以监听当前画布是否容纳了所有元素?
重现链接
无
重现步骤
预期无法实现
预期行为
方案1:当画布没有容纳所有元素时,自动触发小地图的显示,画布容纳了所有元素后,自动隐藏。
方案2:提供API可以监听当前画布是否容纳了所有元素,开发者自行完成期望目标
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: