高级组件GridObjectSortComponent拖动元素后,切换到多任务模式,导致元素重叠问题修复。

Signed-off-by: zhangzuhui <zhangzuhui1@h-partners.com>
This commit is contained in:
zhangzuhui 2024-09-14 16:55:38 +08:00
parent d92c6457ff
commit 1816746fc9
2 changed files with 10 additions and 0 deletions

View File

@ -1862,6 +1862,11 @@ export class GridObjectSortComponent extends ViewPU {
}
this.calcGridHeight();
});
LongPressGesture.onActionCancel(() => {
if (this.isStartDrag) {
this.insertItem(this.itemIndex, this.itemIndex);
}
});
LongPressGesture.pop();
Gesture.pop();
Grid.clip(false);

View File

@ -1267,6 +1267,11 @@ export struct GridObjectSortComponent {
}
this.calcGridHeight();
})
.onActionCancel(() => {
if (this.isStartDrag) {
this.insertItem(this.itemIndex, this.itemIndex);
}
})
)
.clip(false)
.editMode(this.gridComState)