修复scale为1时缩放未清除浮起图&&不指定extraInfo无法发起拖拽的问题

Signed-off-by: b30058220 <baodi1@huawei.com>
Change-Id: I30db9e871d963aaed816b3ea89660b7b6ec727a9
This commit is contained in:
b30058220 2024-10-12 08:37:17 +00:00
parent b887faf615
commit 3407fb7922
2 changed files with 2 additions and 2 deletions

View File

@ -491,7 +491,7 @@ bool GestureEventHub::IsPixelMapNeedScale() const
CHECK_NULL_RETURN(frameNode, false);
auto width = pixelMap_->GetWidth();
auto maxWidth = DragDropManager::GetMaxWidthBaseOnGridSystem(frameNode->GetContextRefPtr());
if (!frameNode->GetDragPreviewOption().isScaleEnabled || width == 0 || width < maxWidth) {
if (!frameNode->GetDragPreviewOption().isScaleEnabled || width == 0 || width <= maxWidth) {
return false;
}
return true;

View File

@ -1145,7 +1145,7 @@ bool ParseExtraInfo(std::shared_ptr<DragControllerAsyncCtx> asyncCtx, std::strin
napi_get_named_property(asyncCtx->env, element, "extraInfo", &extraInfoValue);
napi_valuetype valueType = napi_undefined;
napi_typeof(asyncCtx->env, extraInfoValue, &valueType);
if (valueType != napi_string) {
if (valueType != napi_string && valueType != napi_undefined) {
errMsg = "The type of extraInfo of the first parameter is incorrect.";
return false;
}