mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-12-02 12:29:44 +00:00
!39999 修复拖拽拖起动效阶段,落位闪一下的问题
Merge pull request !39999 from 贺晨韬/hct_drag_cancel_noId
This commit is contained in:
commit
94dbe7260d
@ -755,7 +755,6 @@ void DragDropManager::OnDragEnd(const PointerEvent& pointerEvent, const std::str
|
||||
return;
|
||||
}
|
||||
}
|
||||
HideDragPreviewOverlay();
|
||||
if (isDragCancel_) {
|
||||
TAG_LOGI(AceLogTag::ACE_DRAG, "DragDropManager is dragCancel, finish drag. WindowId is %{public}d, "
|
||||
"pointerEventId is %{public}d.",
|
||||
@ -924,11 +923,15 @@ void DragDropManager::OnDragDrop(RefPtr<OHOS::Ace::DragEvent>& event, const RefP
|
||||
CHECK_NULL_VOID(container);
|
||||
auto windowId = container->GetWindowId();
|
||||
pipeline->AddAfterRenderTask([dragResult, useCustomAnimation, windowId, dragBehavior,
|
||||
pointerEventId = pointerEvent.pointerEventId]() {
|
||||
pointerEventId = pointerEvent.pointerEventId, weak = WeakClaim(this)]() {
|
||||
TAG_LOGI(AceLogTag::ACE_DRAG,
|
||||
"Stop drag, start do drop animation. UseCustomAnimation is %{public}d,"
|
||||
"WindowId is %{public}d, pointerEventId is %{public}d.",
|
||||
useCustomAnimation, windowId, pointerEventId);
|
||||
auto manager = weak.Upgrade();
|
||||
if (manager) {
|
||||
manager->HideDragPreviewOverlay();
|
||||
}
|
||||
InteractionInterface::GetInstance()->SetDragWindowVisible(!useCustomAnimation);
|
||||
DragDropRet dragDropRet { dragResult, useCustomAnimation, windowId, dragBehavior };
|
||||
InteractionInterface::GetInstance()->StopDrag(dragDropRet);
|
||||
@ -1987,6 +1990,7 @@ void DragDropManager::GetGatherPixelMap(DragDataCore& dragData, float scale, flo
|
||||
void DragDropManager::ResetDragDrop(int32_t windowId, const Point& point)
|
||||
{
|
||||
DragDropRet dragDropRet { DragRet::DRAG_FAIL, isMouseDragged_, windowId, DragBehavior::UNKNOWN };
|
||||
HideDragPreviewOverlay();
|
||||
ResetDragDropStatus(point, dragDropRet, windowId);
|
||||
dragCursorStyleCore_ = DragCursorStyleCore::DEFAULT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user