Skip to content

BlockSuite API Documentation / @blocksuite/blocks / LocalConnectorElementModel

Class: LocalConnectorElementModel

Extends

  • GfxLocalElementModel

Constructors

new LocalConnectorElementModel()

new LocalConnectorElementModel(surfaceModel): LocalConnectorElementModel

Parameters

surfaceModel

SurfaceBlockModel

Returns

LocalConnectorElementModel

Inherited from

GfxLocalElementModel.constructor

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:34

Properties

_local

protected _local: Map<string | symbol, unknown>

Inherited from

GfxLocalElementModel._local

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:10


_props

protected _props: Set<string | symbol>

Used to store all the name of the properties that have been decorated with the @prop

Inherited from

GfxLocalElementModel._props

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:15


_surface

protected _surface: SurfaceBlockModel

Inherited from

GfxLocalElementModel._surface

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:16


absolutePath

absolutePath: PointLocation[]

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:7


cache

cache: Map<string | symbol, unknown>

used to store the properties' cache key when the properties required heavy computation

Inherited from

GfxLocalElementModel.cache

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:21


frontEndpointStyle

frontEndpointStyle: PointStyle

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:8


id

id: string

Inherited from

GfxLocalElementModel.id

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:22


mode

mode: ConnectorMode

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:9


rearEndpointStyle

rearEndpointStyle: PointStyle

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:10


rough?

optional rough: boolean

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:11


roughness

roughness: number

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:12


source

source: Connection

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:13


stroke

stroke: Color

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:14


strokeStyle

strokeStyle: StrokeStyle

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:15


strokeWidth

strokeWidth: number

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:16


target

target: Connection

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:17


updatingPath

updatingPath: boolean

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:18

Accessors

deserializedXYWH

Get Signature

get deserializedXYWH(): XYWH

Returns

XYWH

Inherited from

GfxLocalElementModel.deserializedXYWH

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:24


elementBound

Get Signature

get elementBound(): Bound

The bound of the element without considering the response extension.

Returns

Bound

Inherited from

GfxLocalElementModel.elementBound

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:25


group

Get Signature

get group(): null | GfxGroupModel

Returns

null | GfxGroupModel

Inherited from

GfxLocalElementModel.group

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:26


groupId

Inherited from

GfxLocalElementModel.groupId

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:46


groups

Get Signature

get groups(): GfxGroupModel[]

Returns

GfxGroupModel[]

Inherited from

GfxLocalElementModel.groups

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:27


h

Get Signature

get h(): number

Returns

number

Inherited from

GfxLocalElementModel.h

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:28


hidden

Inherited from

GfxLocalElementModel.hidden

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:47


index

Inherited from

GfxLocalElementModel.index

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:48


opacity

Inherited from

GfxLocalElementModel.opacity

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:49


path

Get Signature

get path(): PointLocation[]

Returns

PointLocation[]

Set Signature

set path(value): void

Parameters
value

PointLocation[]

Returns

void

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:19


responseBound

Get Signature

get responseBound(): Bound

The bound of the element considering the response extension.

Returns

Bound

Inherited from

GfxLocalElementModel.responseBound

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:29


responseExtension

Defines the extension of the response area beyond the element's bounding box. This tuple specifies the horizontal and vertical margins to be added to the element's bound.

The first value represents the horizontal extension (added to both left and right sides), and the second value represents the vertical extension (added to both top and bottom sides).

The response area is computed as: [x - horizontal, y - vertical, w + 2 * horizontal, h + 2 * vertical].

Example:

  • xywh: [0, 0, 100, 100], responseExtension: [10, 20] Resulting response area: [-10, -20, 120, 140].
  • responseExtension: [0, 0] keeps the response area equal to the bounding box.

Inherited from

GfxLocalElementModel.responseExtension

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:50


rotate

Inherited from

GfxLocalElementModel.rotate

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:51


seed

Inherited from

GfxLocalElementModel.seed

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:52


surface

Get Signature

get surface(): SurfaceBlockModel

Returns

SurfaceBlockModel

Inherited from

GfxLocalElementModel.surface

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:30


type

Get Signature

get type(): string

Returns

string

Overrides

GfxLocalElementModel.type

Defined in

packages/affine/model/dist/elements/connector/local-connector.d.ts:21


w

Get Signature

get w(): number

Returns

number

Inherited from

GfxLocalElementModel.w

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:31


x

Get Signature

get x(): number

Returns

number

Inherited from

GfxLocalElementModel.x

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:32


xywh

Inherited from

GfxLocalElementModel.xywh

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:53


y

Get Signature

get y(): number

Returns

number

Inherited from

GfxLocalElementModel.y

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:33

Methods

containsBound()

containsBound(bounds): boolean

Parameters

bounds

Bound

Returns

boolean

Inherited from

GfxLocalElementModel.containsBound

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:35


getLineIntersections()

getLineIntersections(start, end): null | PointLocation[]

Parameters

start

IVec

end

IVec

Returns

null | PointLocation[]

Inherited from

GfxLocalElementModel.getLineIntersections

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:36


getNearestPoint()

getNearestPoint(point): IVec

Parameters

point

IVec

Returns

IVec

Inherited from

GfxLocalElementModel.getNearestPoint

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:37


getRelativePointLocation()

getRelativePointLocation(relativePoint): PointLocation

Parameters

relativePoint

IVec

Returns

PointLocation

Inherited from

GfxLocalElementModel.getRelativePointLocation

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:38


includesPoint()

includesPoint(x, y, opt, __): boolean

Parameters

x

number

y

number

opt

PointTestOptions

__

EditorHost

Returns

boolean

Inherited from

GfxLocalElementModel.includesPoint

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:39


intersectsBound()

intersectsBound(bound): boolean

Parameters

bound

Bound

Returns

boolean

Inherited from

GfxLocalElementModel.intersectsBound

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:40


isLocked()

isLocked(): boolean

Check if the element is locked. It will check the lock status of the element and its ancestors.

Returns

boolean

Inherited from

GfxLocalElementModel.isLocked

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:41


isLockedByAncestor()

isLockedByAncestor(): boolean

Returns

boolean

Inherited from

GfxLocalElementModel.isLockedByAncestor

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:42


isLockedBySelf()

isLockedBySelf(): boolean

Returns

boolean

Inherited from

GfxLocalElementModel.isLockedBySelf

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:43


lock()

lock(): void

Returns

void

Inherited from

GfxLocalElementModel.lock

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:44


unlock()

unlock(): void

Returns

void

Inherited from

GfxLocalElementModel.unlock

Defined in

packages/framework/block-std/dist/gfx/model/surface/local-element-model.d.ts:45