From b602bca44bed513277cffb32ee3a5c6c143bbdaf Mon Sep 17 00:00:00 2001 From: wanglili12 Date: Fri, 5 Sep 2025 16:12:05 +0800 Subject: [PATCH] =?UTF-8?q?postion=E6=8E=A5=E5=8F=A3=E5=90=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wanglili12 --- api/arkui/FrameNode.static.d.ets | 46 +++++++++++++++---------------- api/arkui/Graphics.static.d.ets | 4 +-- api/arkui/RenderNode.static.d.ets | 10 +++---- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/api/arkui/FrameNode.static.d.ets b/api/arkui/FrameNode.static.d.ets index 17fc31f3eb..49aae95363 100644 --- a/api/arkui/FrameNode.static.d.ets +++ b/api/arkui/FrameNode.static.d.ets @@ -20,7 +20,7 @@ */ import { RenderNode } from './RenderNode'; -import { Size, Position, Edges, LengthMetrics, SizeT } from './Graphics'; +import { Size, NodePosition, Edges, LengthMetrics, SizeT } from './Graphics'; import { DrawContext } from './Graphics'; import { ComponentContent } from './ComponentContent'; import { BusinessError } from '../@ohos.base'; @@ -337,11 +337,11 @@ export declare class FrameNode { /** * Get the position of the node relative to window. * - * @returns { Position } - Returns position of the node relative to window. + * @returns { NodePosition } - Returns position of the node relative to window. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getPositionToWindow(): Position; + getPositionToWindow(): NodePosition; /** * Get if the FrameNode is disposed. @@ -355,11 +355,11 @@ export declare class FrameNode { /** * Get the position of the node relative to its parent. * - * @returns { Position } - Returns position of the node relative to its parent. + * @returns { NodePosition } - Returns position of the node relative to its parent. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getPositionToParent(): Position; + getPositionToParent(): NodePosition; /** * Get the size of the FrameNode after measure, with unit PX. @@ -373,11 +373,11 @@ export declare class FrameNode { /** * Get the offset to the parent of the FrameNode after layout, with unit PX. * - * @returns { Position } - Returns the offset to the parent of the FrameNode after layout, with unit PX. + * @returns { NodePosition } - Returns the offset to the parent of the FrameNode after layout, with unit PX. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getLayoutPosition(): Position; + getLayoutPosition(): NodePosition; /** * Get the user config border width of the FrameNode. @@ -544,11 +544,11 @@ export declare class FrameNode { * Method to assign a position to the FrameNode and each of its children. Use this method to override the * default layout method. * - * @param { Position } position - The position of the node, will be used when executed layout method. + * @param { NodePosition } position - The position of the node, will be used when executed layout method. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onLayout(position: Position): void; + onLayout(position: NodePosition): void; /** * Set the size of the FrameNode after measure, with unit PX. @@ -562,11 +562,11 @@ export declare class FrameNode { /** * Set the position to the parent of the FrameNode after layout, with unit PX. * - * @param { Position } position - The position to the parent of the FrameNode after layout. + * @param { NodePosition } position - The position to the parent of the FrameNode after layout. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - setLayoutPosition(position: Position): void; + setLayoutPosition(position: NodePosition): void; /** * This is called to find out how big the FrameNode should be. The parent node supplies constraint information. The @@ -583,11 +583,11 @@ export declare class FrameNode { * the position of the frameNode, and the actual layout work of FrameNode is performed in onLayout or the default * layout method. * - * @param { Position } position - The position of the node, will be used when executed the layout method. + * @param { NodePosition } position - The position of the node, will be used when executed the layout method. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - layout(position: Position): void; + layout(position: NodePosition): void; /** * Mark the frame node as need layout. @@ -608,47 +608,47 @@ export declare class FrameNode { /** * Get the position of the node relative to screen. * - * @returns { Position } - Returns position of the node relative to screen. + * @returns { NodePosition } - Returns position of the node relative to screen. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getPositionToScreen(): Position; + getPositionToScreen(): NodePosition; /** * Get the position of the node relative to unified display, in vp. * - * @returns { Position } - Returns position of the node relative to unified display, in vp. + * @returns { NodePosition } - Returns position of the node relative to unified display, in vp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getGlobalPositionOnDisplay(): Position; + getGlobalPositionOnDisplay(): NodePosition; /** * Get the position of the node relative to window with transform. * - * @returns { Position } - Returns position of the node relative to window with transform. + * @returns { NodePosition } - Returns position of the node relative to window with transform. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getPositionToWindowWithTransform(): Position; + getPositionToWindowWithTransform(): NodePosition; /** * Get the position of the node relative to its parent with transform. * - * @returns { Position } - Returns position of the node relative to its parent with transform. + * @returns { NodePosition } - Returns position of the node relative to its parent with transform. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getPositionToParentWithTransform(): Position; + getPositionToParentWithTransform(): NodePosition; /** * Get the position of the node relative to screen with transform. * - * @returns { Position } - Returns position of the node relative to screen with transform. + * @returns { NodePosition } - Returns position of the node relative to screen with transform. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - getPositionToScreenWithTransform(): Position; + getPositionToScreenWithTransform(): NodePosition; /** * Detach from parent and dispose all child recursively. diff --git a/api/arkui/Graphics.static.d.ets b/api/arkui/Graphics.static.d.ets index 2de2437e62..ea3a200285 100644 --- a/api/arkui/Graphics.static.d.ets +++ b/api/arkui/Graphics.static.d.ets @@ -217,11 +217,11 @@ export type Offset = Vector2; /** * Position info. * - * @typedef { Vector2 } Position + * @typedef { Vector2 } NodePosition * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ -export type Position = Vector2; +export type NodePosition = Vector2; /** * PositionT info. diff --git a/api/arkui/RenderNode.static.d.ets b/api/arkui/RenderNode.static.d.ets index 6bd6560309..8f5625bddd 100644 --- a/api/arkui/RenderNode.static.d.ets +++ b/api/arkui/RenderNode.static.d.ets @@ -19,7 +19,7 @@ * @kit ArkUI * @arkts 1.2 */ -import { DrawContext, Size, Offset, Position, Pivot, Scale, Translation, Matrix4, Rotation, Frame, NodeBorderRadiuses, ShapeMask, ShapeClip, Edges, LengthMetricsUnit } from './Graphics'; +import { DrawContext, Size, Offset, NodePosition, Pivot, Scale, Translation, Matrix4, Rotation, Frame, NodeBorderRadiuses, ShapeMask, ShapeClip, Edges, LengthMetricsUnit } from './Graphics'; import { BorderStyle } from './component/enums'; /** @@ -188,20 +188,20 @@ export declare class RenderNode { /** * Set frame position of the RenderNode. * - * @param { Position } position - The position of the RenderNode frame. + * @param { NodePosition } position - The position of the RenderNode frame. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - set position(position: Position); + set position(position: NodePosition); /** * Get frame position of the RenderNode. * - * @returns { Position } - The position of the RenderNode frame. + * @returns { NodePosition } - The position of the RenderNode frame. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - get position(): Position; + get position(): NodePosition; /** * Set frame info of the RenderNode. -- Gitee