!39703 ArkTS的节点支持c-api设置NODE_LAYOUT_RECT

Merge pull request !39703 from yeyinglong/listtest5
This commit is contained in:
openharmony_ci 2024-08-05 15:14:49 +00:00 committed by Gitee
commit 00df734746
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -292,7 +292,7 @@ int32_t SetAttribute(ArkUI_NodeHandle node, ArkUI_NodeAttributeType attribute, c
if (node == nullptr) {
return ERROR_CODE_PARAM_INVALID;
}
if (node->type == -1) {
if (node->type == -1 && attribute != NODE_LAYOUT_RECT) {
return ERROR_CODE_NATIVE_IMPL_BUILDER_NODE_ERROR;
}
return SetNodeAttribute(node, attribute, value);
@ -303,7 +303,7 @@ int32_t ResetAttribute(ArkUI_NodeHandle node, ArkUI_NodeAttributeType attribute)
if (node == nullptr) {
return ERROR_CODE_PARAM_INVALID;
}
if (node->type == -1) {
if (node->type == -1 && attribute != NODE_LAYOUT_RECT) {
return ERROR_CODE_NATIVE_IMPL_BUILDER_NODE_ERROR;
}
return ResetNodeAttribute(node, attribute);