mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 01:03:08 +00:00
fix pixelmap动态切换
Signed-off-by: zhangjinyu101 <zhangjinyu101@huawei.com> Change-Id: I42e4aa9c1e6856eb7de6c24c738a834a9d317867
This commit is contained in:
parent
536dc53d0c
commit
d74dc37b74
@ -472,14 +472,19 @@ int32_t OH_ArkUI_SetNodeDragPreviewOption(ArkUI_NodeHandle node, ArkUI_DragPrevi
|
||||
int32_t OH_ArkUI_SetNodeDragPreview(ArkUI_NodeHandle node, OH_PixelmapNative* preview)
|
||||
{
|
||||
auto* impl = OHOS::Ace::NodeModel::GetFullImpl();
|
||||
if (!impl || !node || !preview) {
|
||||
if (!impl || !node) {
|
||||
return ARKUI_ERROR_CODE_PARAM_INVALID;
|
||||
}
|
||||
if (!preview) {
|
||||
impl->getNodeModifiers()->getCommonModifier()->resetDragPreview(node->uiNodeHandle);
|
||||
return ARKUI_ERROR_CODE_NO_ERROR;
|
||||
}
|
||||
auto previewPixelNative = reinterpret_cast<OH_PixelmapNativeHandle>(preview);
|
||||
auto pixelMap = previewPixelNative->GetInnerPixelmap();
|
||||
impl->getDragAdapterAPI()->setDragPreview(node->uiNodeHandle, &pixelMap);
|
||||
return ARKUI_ERROR_CODE_NO_ERROR;
|
||||
}
|
||||
|
||||
int32_t OH_ArkUI_SetNodeAllowedDropDataTypes(ArkUI_NodeHandle node, const char* typesArray[], int32_t count)
|
||||
{
|
||||
auto* fullImpl = OHOS::Ace::NodeModel::GetFullImpl();
|
||||
|
Loading…
Reference in New Issue
Block a user