BlockSuite API Documentation / @blocksuite/blocks / ConnectorElementModel
Class: ConnectorElementModel
Contents
Extends
ElementModel
<ConnectorElementProps
>
Constructors
new ConnectorElementModel(options)
new ConnectorElementModel(
options
):ConnectorElementModel
Parameters
• options: Object
• options.model: SurfaceBlockModel
• options.onchange: (props
) => void
• options.stashedStore: Map
<unknown
, unknown
>
• options.yMap: Map
<unknown
>
Returns
Inherited from
ElementModel<ConnectorElementProps>.constructor
Source
packages/blocks/src/surface-block/element-model/base.ts:36
Properties
_onchange?
protected
_onchange?: (props
) =>void
Parameters
• props: Record
<string
, Object
>
Returns
void
Inherited from
ElementModel._onchange
Source
packages/blocks/src/surface-block/element-model/base.ts:22
frontEndpointStyle?
frontEndpointStyle?:
PointStyle
Source
packages/blocks/src/surface-block/element-model/connector.ts:74
index
index:
string
='a0'
Inherited from
ElementModel.index
Source
packages/blocks/src/surface-block/element-model/base.ts:34
mode
mode:
ConnectorMode
=ConnectorMode.Orthogonal
Source
packages/blocks/src/surface-block/element-model/connector.ts:46
rearEndpointStyle?
rearEndpointStyle?:
PointStyle
Source
packages/blocks/src/surface-block/element-model/connector.ts:77
rotate
rotate:
number
=0
Overrides
ElementModel.rotate
Source
packages/blocks/src/surface-block/element-model/connector.ts:43
rough?
rough?:
boolean
Source
packages/blocks/src/surface-block/element-model/connector.ts:61
roughness
roughness:
number
=DEFAULT_ROUGHNESS
Source
packages/blocks/src/surface-block/element-model/connector.ts:58
source
source:
Connection
Source
packages/blocks/src/surface-block/element-model/connector.ts:64
stroke
stroke:
string
='#000000'
Source
packages/blocks/src/surface-block/element-model/connector.ts:52
strokeStyle
strokeStyle:
StrokeStyle
='solid'
Source
packages/blocks/src/surface-block/element-model/connector.ts:55
strokeWidth
strokeWidth:
number
=4
Source
packages/blocks/src/surface-block/element-model/connector.ts:49
surfaceModel
surfaceModel:
SurfaceBlockModel
Inherited from
ElementModel.surfaceModel
Source
packages/blocks/src/surface-block/element-model/base.ts:25
target
target:
Connection
Source
packages/blocks/src/surface-block/element-model/connector.ts:69
xywh
xywh: `[${number},${number},${number},${number}]` =
'[0,0,0,0]'
Overrides
ElementModel.xywh
Source
packages/blocks/src/surface-block/element-model/connector.ts:40
yMap
yMap:
Map
<unknown
>
Inherited from
ElementModel.yMap
Source
packages/blocks/src/surface-block/element-model/base.ts:24
Accessors
deserializedXYWH
get
deserializedXYWH():XYWH
Returns
XYWH
Source
packages/blocks/src/surface-block/element-model/base.ts:50
elementBound
get
elementBound():Bound
Returns
Source
packages/blocks/src/surface-block/element-model/base.ts:78
group
get
group():null
|GroupElementModel
Returns
null
| GroupElementModel
Source
packages/blocks/src/surface-block/element-model/base.ts:70
h
get
h():number
Returns
number
Source
packages/blocks/src/surface-block/element-model/base.ts:66
id
get
id():string
Returns
string
Source
packages/blocks/src/surface-block/element-model/base.ts:74
type
get
type():string
Returns
string
Source
packages/blocks/src/surface-block/element-model/connector.ts:35
w
get
w():number
Returns
number
Source
packages/blocks/src/surface-block/element-model/base.ts:62
x
get
x():number
Returns
number
Source
packages/blocks/src/surface-block/element-model/base.ts:54
y
get
y():number
Returns
number
Source
packages/blocks/src/surface-block/element-model/base.ts:58
Methods
pop()
pop(
prop
):void
Parameters
• prop: "source"
| "index"
| "mode"
| "stroke"
| "strokeWidth"
| "strokeStyle"
| "roughness"
| "rough"
| "target"
| "frontEndpointStyle"
| "rearEndpointStyle"
Returns
void
Inherited from
ElementModel.pop
Source
packages/blocks/src/surface-block/element-model/base.ts:94
stash()
stash(
prop
):void
Parameters
• prop: "source"
| "index"
| "mode"
| "stroke"
| "strokeWidth"
| "strokeStyle"
| "roughness"
| "rough"
| "target"
| "frontEndpointStyle"
| "rearEndpointStyle"
Returns
void
Inherited from
ElementModel.stash
Source
packages/blocks/src/surface-block/element-model/base.ts:86
propsToYStruct()
static
propsToYStruct(props
):Record
<string
,unknown
>
Parameters
• props: Record
<string
, unknown
>
Returns
Record
<string
, unknown
>
Inherited from
ElementModel.propsToYStruct
Source
packages/blocks/src/surface-block/element-model/base.ts:17
Generated using typedoc-plugin-markdown and TypeDoc