mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 01:03:08 +00:00
fix dragController角标异常
Signed-off-by: b30058220 <baodi1@huawei.com> Change-Id: I0e9cfa7697e505097ac6bafcfa51374d7c98a4a0
This commit is contained in:
parent
e2610d92f5
commit
38fe2e7ac4
@ -175,7 +175,7 @@ bool DragEventActuator::IsCurrentNodeStatusSuitableForDragging(
|
||||
touchRestrict.inputEventType == InputEventType::AXIS || IsBelongToMultiItemNode(frameNode)) {
|
||||
TAG_LOGI(AceLogTag::ACE_DRAG,
|
||||
"No need to collect drag gestures result, drag forbidden set is %{public}d,"
|
||||
"frameNode draggable is %{public}d, custom set is %{public}d,",
|
||||
"frameNode draggable is %{public}d, custom set is %{public}d",
|
||||
gestureHub->IsDragForbidden(), frameNode->IsDraggable(), frameNode->IsCustomerSet());
|
||||
return false;
|
||||
}
|
||||
|
@ -683,7 +683,7 @@ public:
|
||||
}
|
||||
|
||||
void SetBindMenuStatus(bool setIsShow, bool isShow, MenuPreviewMode previewMode);
|
||||
const BindMenuStatus& GetBindMenuStatus()
|
||||
const BindMenuStatus& GetBindMenuStatus() const
|
||||
{
|
||||
return bindMenuStatus_;
|
||||
}
|
||||
|
@ -1403,8 +1403,15 @@ bool ParsePreviewOptions(
|
||||
napi_get_named_property(asyncCtx->env, previewOptionsNApi, "numberBadge", &numberBadgeNApi);
|
||||
napi_typeof(asyncCtx->env, numberBadgeNApi, &valueType);
|
||||
if (valueType == napi_number) {
|
||||
asyncCtx->dragPreviewOption.isNumber = true;
|
||||
napi_get_value_int32(asyncCtx->env, numberBadgeNApi, &asyncCtx->dragPreviewOption.badgeNumber);
|
||||
int64_t number = 0;
|
||||
napi_get_value_int64(asyncCtx->env, numberBadgeNApi, &number);
|
||||
if (number < 0 || number > INT_MAX) {
|
||||
asyncCtx->dragPreviewOption.isNumber = false;
|
||||
asyncCtx->dragPreviewOption.isShowBadge = true;
|
||||
} else {
|
||||
asyncCtx->dragPreviewOption.isNumber = true;
|
||||
napi_get_value_int32(asyncCtx->env, numberBadgeNApi, &asyncCtx->dragPreviewOption.badgeNumber);
|
||||
}
|
||||
} else if (valueType == napi_boolean) {
|
||||
asyncCtx->dragPreviewOption.isNumber = false;
|
||||
napi_get_value_bool(asyncCtx->env, numberBadgeNApi, &asyncCtx->dragPreviewOption.isShowBadge);
|
||||
|
Loading…
Reference in New Issue
Block a user