Skip to content

BlockSuite API Documentation / @blocksuite/affine-model / LocalConnectorElementModel

Class: LocalConnectorElementModel

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:13

Extends

  • GfxLocalElementModel

Constructors

new LocalConnectorElementModel()

new LocalConnectorElementModel(surfaceModel): LocalConnectorElementModel

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

Parameters

surfaceModel

SurfaceBlockModel

Returns

LocalConnectorElementModel

Inherited from

GfxLocalElementModel.constructor

Properties

_local

protected _local: Map<string | symbol, unknown>

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

Inherited from

GfxLocalElementModel._local


_props

protected _props: Set<string | symbol>

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

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

Inherited from

GfxLocalElementModel._props


_surface

protected _surface: SurfaceBlockModel

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

Inherited from

GfxLocalElementModel._surface


absolutePath

absolutePath: PointLocation[] = []

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:16


cache

cache: Map<string | symbol, unknown>

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

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

Inherited from

GfxLocalElementModel.cache


frontEndpointStyle

frontEndpointStyle: PointStyle

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:18


id

id: string

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

Inherited from

GfxLocalElementModel.id


mode

mode: ConnectorMode = ConnectorMode.Orthogonal

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:20


rearEndpointStyle

rearEndpointStyle: PointStyle

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:22


rough?

optional rough: boolean

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:24


roughness

roughness: number = DEFAULT_ROUGHNESS

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:26


source

source: Connection

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:28


stroke

stroke: string | { normal: string; } | { dark: string; light: string; } = DefaultTheme.connectorColor

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:32


strokeStyle

strokeStyle: StrokeStyle = StrokeStyle.Solid

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:34


strokeWidth

strokeWidth: number = 4

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:36


target

target: Connection

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:38


updatingPath

updatingPath: boolean = false

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:42

Accessors

deserializedXYWH

Get Signature

get deserializedXYWH(): XYWH

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

Returns

XYWH

Inherited from

GfxLocalElementModel.deserializedXYWH


elementBound

Get Signature

get elementBound(): Bound

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

The bound of the element without considering the response extension.

Returns

Bound

Inherited from

GfxLocalElementModel.elementBound


group

Get Signature

get group(): null | GfxGroupModel

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

Returns

null | GfxGroupModel

Inherited from

GfxLocalElementModel.group


groupId

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

Inherited from

GfxLocalElementModel.groupId


groups

Get Signature

get groups(): GfxGroupModel[]

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

Returns

GfxGroupModel[]

Inherited from

GfxLocalElementModel.groups


h

Get Signature

get h(): number

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

Returns

number

Inherited from

GfxLocalElementModel.h


hidden

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

Inherited from

GfxLocalElementModel.hidden


index

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

Inherited from

GfxLocalElementModel.index


opacity

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

Inherited from

GfxLocalElementModel.opacity


path

Get Signature

get path(): PointLocation[]

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:44

Returns

PointLocation[]

Set Signature

set path(value): void

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:48

Parameters
value

PointLocation[]

Returns

void


responseBound

Get Signature

get responseBound(): Bound

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

The bound of the element considering the response extension.

Returns

Bound

Inherited from

GfxLocalElementModel.responseBound


responseExtension

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

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


rotate

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

Inherited from

GfxLocalElementModel.rotate


seed

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

Inherited from

GfxLocalElementModel.seed


surface

Get Signature

get surface(): SurfaceBlockModel

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

Returns

SurfaceBlockModel

Inherited from

GfxLocalElementModel.surface


type

Get Signature

get type(): string

Defined in: packages/affine/model/src/elements/connector/local-connector.ts:55

Returns

string

Overrides

GfxLocalElementModel.type


w

Get Signature

get w(): number

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

Returns

number

Inherited from

GfxLocalElementModel.w


x

Get Signature

get x(): number

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

Returns

number

Inherited from

GfxLocalElementModel.x


xywh

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

Inherited from

GfxLocalElementModel.xywh


y

Get Signature

get y(): number

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

Returns

number

Inherited from

GfxLocalElementModel.y

Methods

containsBound()

containsBound(bounds): boolean

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

Parameters

bounds

Bound

Returns

boolean

Inherited from

GfxLocalElementModel.containsBound


getLineIntersections()

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

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

Parameters

start

IVec

end

IVec

Returns

null | PointLocation[]

Inherited from

GfxLocalElementModel.getLineIntersections


getNearestPoint()

getNearestPoint(point): IVec

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

Parameters

point

IVec

Returns

IVec

Inherited from

GfxLocalElementModel.getNearestPoint


getRelativePointLocation()

getRelativePointLocation(relativePoint): PointLocation

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

Parameters

relativePoint

IVec

Returns

PointLocation

Inherited from

GfxLocalElementModel.getRelativePointLocation


includesPoint()

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

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

Parameters

x

number

y

number

opt

PointTestOptions

__

EditorHost

Returns

boolean

Inherited from

GfxLocalElementModel.includesPoint


intersectsBound()

intersectsBound(bound): boolean

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

Parameters

bound

Bound

Returns

boolean

Inherited from

GfxLocalElementModel.intersectsBound


isLocked()

isLocked(): boolean

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

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

Returns

boolean

Inherited from

GfxLocalElementModel.isLocked


isLockedByAncestor()

isLockedByAncestor(): boolean

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

Returns

boolean

Inherited from

GfxLocalElementModel.isLockedByAncestor


isLockedBySelf()

isLockedBySelf(): boolean

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

Returns

boolean

Inherited from

GfxLocalElementModel.isLockedBySelf


lock()

lock(): void

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

Returns

void

Inherited from

GfxLocalElementModel.lock


unlock()

unlock(): void

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

Returns

void

Inherited from

GfxLocalElementModel.unlock