From 639e7550adbe04daa47b64c2c7ac397284e8e0f8 Mon Sep 17 00:00:00 2001 From: zhou-chaobo Date: Fri, 29 Aug 2025 16:07:51 +0800 Subject: [PATCH] LongPressGesture add maximum move distance Signed-off-by: zhou-chaobo --- api/@internal/component/ets/gesture.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts index 5f6f279b39..3ef0b17d06 100644 --- a/api/@internal/component/ets/gesture.d.ts +++ b/api/@internal/component/ets/gesture.d.ts @@ -4298,6 +4298,17 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @arkts 1.1&1.2 */ duration?: number; + /** + * Indicates maximum moving distance, in px. + * The default value is 15px. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ + allowableMovement?: number; } /** @@ -5653,6 +5664,17 @@ declare class LongPressRecognizer extends GestureRecognizer { * @arkts 1.1&1.2 */ getDuration(): number; + /** + * Returns the long press gesture's maximum moving distance. + * The unit is px. + * + * @returns { number } - the maximum moving distance of the long press gesture. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ + getAllowableMovement(): number; } /** -- Gitee