mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 09:12:41 +00:00
grid使用OnItemDrag拖拽切后台跟手图卡住
Signed-off-by: wangzhihao <wangzhihao42@huawei.com>
This commit is contained in:
parent
bed7e600c8
commit
7031b6287e
@ -813,6 +813,18 @@ void DragDropManager::DoDragReset()
|
||||
isDragNodeNeedClean_ = false;
|
||||
}
|
||||
|
||||
void DragDropManager::ResetDraggingStatus(const TouchEvent& touchPoint)
|
||||
{
|
||||
if (IsDraggingPressed(touchPoint.id)) {
|
||||
SetDraggingPressedState(false);
|
||||
}
|
||||
if (!IsItemDragging() && IsDragging() && IsSameDraggingPointer(touchPoint.id)) {
|
||||
OnDragEnd(
|
||||
PointerEvent(touchPoint.touchEventId, touchPoint.x, touchPoint.y, touchPoint.screenX, touchPoint.screenY),
|
||||
"");
|
||||
}
|
||||
}
|
||||
|
||||
void DragDropManager::HandleOnDragEnd(const PointerEvent& pointerEvent, const std::string& extraInfo,
|
||||
const RefPtr<FrameNode>& dragFrameNode)
|
||||
{
|
||||
|
@ -472,6 +472,8 @@ public:
|
||||
currentPullId_ = -1;
|
||||
}
|
||||
|
||||
void ResetDraggingStatus(const TouchEvent& touchPoint);
|
||||
|
||||
private:
|
||||
double CalcDragPreviewDistanceWithPoint(
|
||||
const OHOS::Ace::Dimension& preserverHeight, int32_t x, int32_t y, const DragPreviewInfo& info);
|
||||
|
@ -2904,14 +2904,7 @@ void PipelineContext::ResetDraggingStatus(const TouchEvent& touchPoint, const Re
|
||||
{
|
||||
auto manager = GetDragDropManager();
|
||||
CHECK_NULL_VOID(manager);
|
||||
if (manager->IsDraggingPressed(touchPoint.id)) {
|
||||
manager->SetDraggingPressedState(false);
|
||||
}
|
||||
if (manager->IsDragging() && manager->IsSameDraggingPointer(touchPoint.id)) {
|
||||
manager->OnDragEnd(
|
||||
PointerEvent(touchPoint.touchEventId, touchPoint.x, touchPoint.y, touchPoint.screenX, touchPoint.screenY),
|
||||
"");
|
||||
}
|
||||
manager->ResetDraggingStatus(touchPoint);
|
||||
}
|
||||
|
||||
void PipelineContext::OnSurfaceDensityChanged(double density)
|
||||
|
Loading…
Reference in New Issue
Block a user