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

autoResize设置不生效问题 #1056

Closed
fadeds opened this issue Jun 3, 2021 · 11 comments
Closed

autoResize设置不生效问题 #1056

fadeds opened this issue Jun 3, 2021 · 11 comments
Labels
stale Issue that may be closed soon due to the original author not responding any more. type: bug 缺陷 Defects and unexpected behaviors

Comments

@fadeds
Copy link

fadeds commented Jun 3, 2021

2
1
设置了autoResize,但是只有高度可以自适应,宽度不行

@fadeds fadeds added the type: bug 缺陷 Defects and unexpected behaviors label Jun 3, 2021
@x6-bot
Copy link
Contributor

x6-bot bot commented Jun 3, 2021

👋 @fadeds

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.

@x6-bot x6-bot bot closed this as completed Jun 9, 2021
@NewByVector NewByVector reopened this Jun 9, 2021
@NewByVector
Copy link
Contributor

应该是是宽度能自适应,高度不行吧?

@fadeds
Copy link
Author

fadeds commented Jun 23, 2021

是的,看你flex的方向,只能有一个是自适应的,不能两个方向都能自适应

@x6-bot
Copy link
Contributor

x6-bot bot commented Jul 14, 2021

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the AntV community! 💪💯

@x6-bot x6-bot bot added the stale Issue that may be closed soon due to the original author not responding any more. label Jul 14, 2021
@x6-bot
Copy link
Contributor

x6-bot bot commented Aug 24, 2021

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot 🤖, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the AntV community! 💪💯

@x6-bot x6-bot bot closed this as completed Aug 24, 2021
@javanoclaw
Copy link

应该是是宽度能自适应,高度不行吧?

是的,我也发现了

@mfc6027
Copy link

mfc6027 commented Jan 27, 2022

似乎这个问题还没有解决

@neo-sam
Copy link

neo-sam commented Apr 25, 2022

调试了下源码,发现“高度锁死”的问题逻辑:

  1. 对象初始化记录了宽高,并写死到 container.style
  2. 浏览器大小重置,触发 resize 事件
  3. 事件函数读取长宽大小,container.offsetHeight 总是读取到步骤 1 的值( 由于布局使 container.style.width 失效,offsetWidth 不受影响)

临时解决方法:

window.addEventListener('resize', () => {
    container.style.height = '';
});

@NewByVector reopen 下这个问题,请考虑怎样解锁?

@hyy215
Copy link

hyy215 commented Jun 17, 2022

这问题有解决方案了吗?

@laobieyi
Copy link

laobieyi commented Nov 16, 2022

我这里设置autoResize: true 然后配合 display: flex 使用发现并没有效果。
image
image
image

@x6-bot
Copy link
Contributor

x6-bot bot commented Nov 17, 2023

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.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale Issue that may be closed soon due to the original author not responding any more. type: bug 缺陷 Defects and unexpected behaviors
Projects
None yet
Development

No branches or pull requests

7 participants