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

开启滚动及小地图后画布显示不全,元素被隐藏 #3782

Closed
Theseven87 opened this issue Jul 14, 2023 · 7 comments
Closed

开启滚动及小地图后画布显示不全,元素被隐藏 #3782

Theseven87 opened this issue Jul 14, 2023 · 7 comments
Labels
resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems

Comments

@Theseven87
Copy link

Theseven87 commented Jul 14, 2023

Describe the bug

image
从右下小地图能看出,可视区域非常窄,平移画布的时候会导致元素显示不全甚至是完全被遮挡

Your Example Website or App

Steps to Reproduce the Bug or Issue

1:实例化graph
2:启用滚动和小地图
3:画布中添加元素
4:平移画布

注:在我的例子中实例化graph时只接受了一个el,然后通过动态创建dom的为画布和小地图创建容器,并添加至el容器中

Expected behavior

元素不该被剪切或隐藏

Screenshots or Videos

No response

Platform

  • OS: [ Windows]
  • Browser: [ Chrome]
  • Version: [2.11.5]

Additional context

已解决,当开启画布滚动和小地图的时候,实例化Graph时需要将panning设置为false就好了

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Jul 14, 2023

👋 @Theseven87

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@NewByVector
Copy link
Contributor

能否可以基于 demo 提供一个可以复现的例子。

@NewByVector NewByVector added the resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems label Jul 14, 2023
@Theseven87
Copy link
Author

Theseven87 commented Jul 17, 2023

能否可以基于 demo 提供一个可以复现的例子。

https://codesandbox.io/p/sandbox/x6tooldemo-832m4f?file=%2Fsrc%2Fcomponents%2FHelloWorld.vue%3A16%2C48
这个是demo场景
但是功能我是写了一个包,通过npm安装的
git地址:https://github.com/Theseven87/x6tool

@TLovers
Copy link

TLovers commented Nov 21, 2023

确实有这个问题,但是不开启搞滚动,小地图显示就异常了

@TLovers
Copy link

TLovers commented Nov 21, 2023

能否可以基于 demo 提供一个可以复现的例子。

https://codesandbox.io/p/sandbox/x6tooldemo-832m4f?file=%2Fsrc%2Fcomponents%2FHelloWorld.vue%3A16%2C48 这个是demo场景 但是功能我是写了一个包,通过npm安装的 git地址:https://github.com/Theseven87/x6tool

你说的那个解决方案我很早就按照文档那样写了,但是还是有问题

@JackieCheung
Copy link

JackieCheung commented Dec 22, 2023

panning

同样的问题

graph.use(
       new Scroller({
         enabled: true,
         pannable: true
       })
     )
     .use(
       new MiniMap({
         container: minimapRef.value,
         scalable: false,
         width: 200,
         height: 120
       })
     )

开启scroller和minimap就会显示不全,画布的 panning 不设置默认就是 false 的,有什么解决方案吗?

@zm9913
Copy link

zm9913 commented May 13, 2024

这个问题关了是解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems
Projects
None yet
Development

No branches or pull requests

5 participants