!48593 修复:klv上进行多选拖拽,角标会有跳变的情况

Merge pull request !48593 from Hone/fixdrag1114
This commit is contained in:
openharmony_ci 2024-11-16 10:28:20 +00:00 committed by Gitee
commit b9c6dea5fb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -817,17 +817,20 @@ void GestureEventHub::OnDragStart(const GestureEvent& info, const RefPtr<Pipelin
DragEventActuator::UpdatePreviewPositionAndScale(
imageNode, imageNode->GetOffsetInSubwindow(subWindow->GetWindowRect().GetOffset()));
auto gatherNodeOffset = DragDropManager::GetTouchOffsetRelativeToSubwindow(container->GetInstanceId());
OffsetF offset;
if (pipeline->HasFloatTitle()) {
gatherNodeOffset.SetX(
gatherNodeOffset.GetX() + static_cast<float>((CONTAINER_BORDER_WIDTH + CONTENT_PADDING).ConvertToPx()));
gatherNodeOffset.SetY(
gatherNodeOffset.GetY() +
static_cast<float>((pipeline->GetCustomTitleHeight() + CONTAINER_BORDER_WIDTH).ConvertToPx()));
offset = { static_cast<float>((CONTAINER_BORDER_WIDTH + CONTENT_PADDING).ConvertToPx()),
static_cast<float>((pipeline->GetCustomTitleHeight() + CONTAINER_BORDER_WIDTH).ConvertToPx()) };
}
DragEventActuator::UpdateGatherAnimatePosition(gatherNodeChildrenInfo, gatherNodeOffset);
if (textNode) {
DragEventActuator::UpdatePreviewPositionAndScale(
textNode, textNode->GetOffsetInSubwindow(subWindow->GetWindowRect().GetOffset()));
textNode, textNode->GetOffsetInSubwindow(subWindow->GetWindowRect().GetOffset()) + offset);
}
DragEventActuator::MountPixelMap(
subWindowOverlayManager, eventHub->GetGestureEventHub(), imageNode, textNode, true);