This commit is contained in:
NaBian committed 2021-06-28 23:00:29 +08:00
1 parent a879ebc3b6
commit 2aff85c4e2
1 file changed
+5 -1
@@ -225,7 +225,11 @@ namespace HandyControl.Controls
/// <param name="oldIndex"></param>
private void UpdateItemOffsetX(int oldIndex)
{
if (!_isDragging) return;
if (!_isDragging || CurrentIndex >= TabPanel.ItemDic.Count)
{
return;
}
var moveItem = TabPanel.ItemDic[CurrentIndex];
moveItem.CurrentIndex -= CurrentIndex - oldIndex;
var offsetX = moveItem.TargetOffsetX;