mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 09:12:41 +00:00
!47000 grid使用OnItemDrag拖拽切后台跟手图卡住
Merge pull request !47000 from Hone/h_1028_1
This commit is contained in:
commit
9c36332d1f
@ -814,6 +814,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);
|
||||
|
@ -2944,14 +2944,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