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

快速拖动scrollrect之后,导致不应该被移除的item被移除 #149

Closed
junbinliuext opened this issue Oct 11, 2022 · 1 comment
Closed

Comments

@junbinliuext
Copy link

如gif所示快速拖动scrollrect(大概1~2帧),会导致scrollrect排在前面的item被删掉了,然后导致scrollrect无法正常回弹。
bandicam 2022-10-11 15-38-54-374 mp4_20221011_155029

排查了一下原因,发现是LoopVerticalScrollRect的UpdateItems中,关于DeleteItemAtStart 和 NewItemAtEnd的时序不太对,应该先NewItemAtEnd再DeleteItemAtStart ,这样才能正确的触发DeleteItemAtStart中的Special Case,从而保证排在前面的item不被错误地删除。
Snipaste_2022-10-11_16-18-41

按照上面说的反转两者的执行顺序,能够解决gif中的问题。

@qiankanglai
Copy link
Owner

抱歉由于项目太忙 没有及时反馈orz
问题确实存在,已按照建议修复,非常感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants