Kanglai Qian

Results 58 comments of Kanglai Qian

哈喽,这块逻辑我测试了下有点不对: 我用测试工程试了下了下Top/Bottom的Padding故意改成50 https://user-images.githubusercontent.com/1546130/180629759-b20c7661-9fef-4b15-8a03-e854a7b34bf3.mp4

Hi, Sorry for late reply. I tried to reproduce the problem within demo but failed. ![image](https://user-images.githubusercontent.com/1546130/176992264-d7248031-c591-4fc9-a9e0-e1f14e69dc28.png) Would you mind providing LoopScroll's RectTransform information in SceneView? From the video, it seems...

(Again apologize for only have time to reply in weekend) From the screenshot, it looks right with the width/right. At the same time I can reproduce the problem with `LayoutElement`...

> P.s. I don't have Layout Element component on button prefab because it should change its size depending on text inside. I just wrote a small example for customizing size...

> Ignore Some Element For Pooling I'm not sure whether these elements differs in content or not? From the description, I think you could just take one prefab for pooling,...

> 1、当m_Content底下列表为空时,第一次调用RefillCells(index)并不会定位到index. 所以我试着连续调用两次RefillCells(index)来解决这个问题。 这个是指一开始totalCount=0,然后同一帧修改totalCount之后RefillCells的情况么? 我本地测试了下这样做是没问题的 2、RefillCells(index) 无法定位到最后一个元素。 这里是因为`RefillCells`是考虑的头部元素情况,定位到最后一个元素会出现没法拉过去... 如果是希望定位到后面的,可以考虑`RefillCellsFromEnd`接口。 抱歉最近工作的事情比较忙,周末才有空处理issue。如果可以的话能否提供一个最小可复现例子?

Set `totalCount=-1` should also work for multi mode. I just modify existing example with infinity mode like below ![1654415712437](https://user-images.githubusercontent.com/1546130/172041161-cbce5779-dc52-49f7-8520-a04e4498afd8.png) There is only one detail to mention: https://github.com/qiankanglai/LoopScrollRect/commit/e1b39713e56eb8307c0bbeead8cde535bf3fdcbd#diff-b2700fc46a5a0dc0655ace183243247723bb91a5cbd48621b36ce085450accd0

If you just want to freeze, there is a trick way: just add one additional bool `mDisableDrag` and check the variable in https://github.com/qiankanglai/LoopScrollRect/blob/78714f9fd2427753cd9e3dd0e50a449d2c7f2aa9/Runtime/LoopScrollRectBase.cs#L1385 ``` if (!IsActive() || mDisableDrag) return; ```...

Sorry for late reply. Do you mean strict the range like [mStart, mEnd] rather than [0, totalCount]? It is possible but will break current API a lot, so I won't...

这个需求我其实建议直接修改ScrollToCellCoroutine额外暴露一个回调好了 ``` public void SrollToCellWithinTime(int index, float time, System.Action callback = null) { // ... StartCoroutine(ScrollToCellCoroutine(index, Mathf.Abs(dist) / time, callback)); } IEnumerator ScrollToCellCoroutine(int index, float speed, System.Action callback) { //...