FConnectorShape

GitHubEdit on GitHub
packages@univerjs-pro/sheets-shape-ui

The facade class for connector (line) shape builder and connector relation operations.

APIs

setShapeType

Sets the connector shape type.

Signature

setShapeType(shapeType: ShapeTypeEnum): this

Parameters

  • shapeType (ShapeTypeEnum) - Connector shape type. Must be a connector-type enum value.

Returns

  • (this) - The builder itself for chaining.

setStartArrowType

Sets start arrow type of the connector line.

Signature

setStartArrowType(arrowType: ShapeArrowTypeEnum): this

Parameters

  • arrowType (ShapeArrowTypeEnum) - Start arrow type, available from univerAPI.Enum.ShapeArrowTypeEnum.

Returns

  • (this) - The builder itself for chaining.

setEndArrowType

Sets end arrow type of the connector line.

Signature

setEndArrowType(arrowType: ShapeArrowTypeEnum): this

Parameters

  • arrowType (ShapeArrowTypeEnum) - End arrow type, available from univerAPI.Enum.ShapeArrowTypeEnum.

Returns

  • (this) - The builder itself for chaining.

setStartArrowSize

Sets start arrow size of the connector line.

Signature

setStartArrowSize(arrowSize: ShapeArrowSizeEnum): this

Parameters

  • arrowSize (ShapeArrowSizeEnum) - Start arrow size.

Returns

  • (this) - The builder itself for chaining.

setEndArrowSize

Sets end arrow size of the connector line.

Signature

setEndArrowSize(arrowSize: ShapeArrowSizeEnum): this

Parameters

  • arrowSize (ShapeArrowSizeEnum) - End arrow size.

Returns

  • (this) - The builder itself for chaining.

build

Builds connector shape payload for insert/update.

Signature

build(): IShapeBuilderInfo

Returns

  • (IShapeBuilderInfo) - Shape builder info for insertShape / updateShape.

getEndConnectInfo

Returns end connection info for this connector.

Signature

getEndConnectInfo(): IShapeRelationItem | null

Returns

  • (IShapeRelationItem | null) - End-side relation info, or null if not connected.

getStartConnectInfo

Returns start connection info for this connector.

Signature

getStartConnectInfo(): IShapeRelationItem | null

Returns

  • (IShapeRelationItem | null) - Start-side relation info, or null if not connected.