Skip to content

BlockSuite API Documentation / @blocksuite/blocks / EdgelessBlock

Class: EdgelessBlock<Props>

Extends

Type parameters

Props extends EdgelessSelectableProps = EdgelessSelectableProps

Implements

  • IEdgelessElement

Constructors

new EdgelessBlock(undefined)

new EdgelessBlock<Props>(): EdgelessBlock<Props>

Returns

EdgelessBlock<Props>

Inherited from

BlockModel<Props>.constructor

Source

packages/framework/store/dist/schema/base.d.ts:99

Properties

[modelLabel]

[modelLabel]: Props

Inherited from

BlockModel.[modelLabel]

Source

packages/framework/store/dist/schema/base.d.ts:101


_externalXYWH

private _externalXYWH: undefined | `[${number},${number},${number},${number}]` = undefined

Source

packages/blocks/src/root-block/edgeless/type.ts:77


childrenUpdated

childrenUpdated: Slot<void>

Inherited from

BlockModel.childrenUpdated

Source

packages/framework/store/dist/schema/base.d.ts:120


connectable

connectable: boolean = true

Implementation of

IEdgelessElement.connectable

Source

packages/blocks/src/root-block/edgeless/type.ts:74


created

created: Slot<void>

Inherited from

BlockModel.created

Source

packages/framework/store/dist/schema/base.d.ts:115


deleted

deleted: Slot<void>

Inherited from

BlockModel.deleted

Source

packages/framework/store/dist/schema/base.d.ts:116


flavour

flavour: string

Inherited from

BlockModel.flavour

Source

packages/framework/store/dist/schema/base.d.ts:103


id

id: string

Implementation of

IEdgelessElement.id

Inherited from

BlockModel.id

Source

packages/framework/store/dist/schema/base.d.ts:109


index

index: string

Implementation of

IEdgelessElement.index

Inherited from

BlockModel.index

Source

packages/blocks/src/_common/edgeless/mixin/edgeless-selectable.ts:9


keys

keys: string[]

Inherited from

BlockModel.keys

Source

packages/framework/store/dist/schema/base.d.ts:111


page

page: Doc

Deprecated

use doc instead

Inherited from

BlockModel.page

Source

packages/framework/store/dist/schema/base.d.ts:108


pop

pop: (prop) => void

Parameters

prop: keyof Props & string

Returns

void

Inherited from

BlockModel.pop

Source

packages/framework/store/dist/schema/base.d.ts:113


propsUpdated

propsUpdated: Slot<Object>

Type declaration

key

key: string

Inherited from

BlockModel.propsUpdated

Source

packages/framework/store/dist/schema/base.d.ts:117


role

role: "root" | "hub" | "content"

Inherited from

BlockModel.role

Source

packages/framework/store/dist/schema/base.d.ts:104


rotate

rotate: number = 0

Implementation of

IEdgelessElement.rotate

Source

packages/blocks/src/root-block/edgeless/type.ts:75


stash

stash: (prop) => void

Parameters

prop: keyof Props & string

Returns

void

Inherited from

BlockModel.stash

Source

packages/framework/store/dist/schema/base.d.ts:112


text?

optional text: Text

Inherited from

BlockModel.text

Source

packages/framework/store/dist/schema/base.d.ts:114


version

version: number

Inherited from

BlockModel.version

Source

packages/framework/store/dist/schema/base.d.ts:102


xywh

xywh: `[${number},${number},${number},${number}]`

Implementation of

IEdgelessElement.xywh

Inherited from

BlockModel.xywh

Source

packages/blocks/src/_common/edgeless/mixin/edgeless-selectable.ts:8


yBlock

yBlock: YBlock

Inherited from

BlockModel.yBlock

Source

packages/framework/store/dist/schema/base.d.ts:110

Accessors

childMap

get childMap(): Map<string, number>

Returns

Map<string, number>

Source

packages/framework/store/dist/schema/base.d.ts:123


children

get children(): BlockModel<object>[]

Returns

BlockModel<object>[]

Source

packages/framework/store/dist/schema/base.d.ts:124


doc

get doc(): Doc

set doc(doc): void

Parameters

doc: Doc

Returns

Doc

Source

packages/framework/store/dist/schema/base.d.ts:121


elementBound

get elementBound(): Bound

Returns

Bound

Source

packages/blocks/src/root-block/edgeless/type.ts:91


externalBound

get externalBound(): null | Bound

Returns

null | Bound

Source

packages/blocks/src/root-block/edgeless/type.ts:87


externalXYWH

get externalXYWH(): undefined | `[${number},${number},${number},${number}]`

set externalXYWH(xywh): void

Parameters

xywh: undefined | `[${number},${number},${number},${number}]`

Returns

undefined | `[${number},${number},${number},${number}]`

Source

packages/blocks/src/root-block/edgeless/type.ts:79


group

get group(): null | GroupElementModel

Returns

null | GroupElementModel

Source

packages/blocks/src/root-block/edgeless/type.ts:153


groups

get groups(): GroupElementModel[]

Returns

GroupElementModel[]

Source

packages/blocks/src/root-block/edgeless/type.ts:161

Methods

boxSelect()

boxSelect(bound): boolean

Parameters

bound: Bound

Returns

boolean

Implementation of

IEdgelessElement.boxSelect

Source

packages/blocks/src/root-block/edgeless/type.ts:144


containedByBounds()

containedByBounds(bounds): boolean

Parameters

bounds: Bound

Returns

boolean

Implementation of

IEdgelessElement.containedByBounds

Source

packages/blocks/src/root-block/edgeless/type.ts:101


dispose()

dispose(): void

Returns

void

Inherited from

BlockModel.dispose

Source

packages/framework/store/dist/schema/base.d.ts:129


firstChild()

firstChild(): null | BlockModel<object>

Returns

null | BlockModel<object>

Inherited from

BlockModel.firstChild

Source

packages/framework/store/dist/schema/base.d.ts:126


getNearestPoint()

getNearestPoint(point): IVec

Parameters

point: IVec

Returns

IVec

Implementation of

IEdgelessElement.getNearestPoint

Source

packages/blocks/src/root-block/edgeless/type.ts:113


getRelativePointLocation()

getRelativePointLocation(relativePoint): PointLocation

Parameters

relativePoint: IVec

Returns

PointLocation

Implementation of

IEdgelessElement.getRelativePointLocation

Source

packages/blocks/src/root-block/edgeless/type.ts:130


hitTest()

hitTest(x, y, _, __): boolean

Parameters

x: number

y: number

_: HitTestOptions

__: EditorHost

Returns

boolean

Implementation of

IEdgelessElement.hitTest

Source

packages/blocks/src/root-block/edgeless/type.ts:96


intersectWithLine()

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

Parameters

start: IVec

end: IVec

Returns

null | PointLocation[]

Implementation of

IEdgelessElement.intersectWithLine

Source

packages/blocks/src/root-block/edgeless/type.ts:121


isEmpty()

isEmpty(): boolean

Returns

boolean

Inherited from

BlockModel.isEmpty

Source

packages/framework/store/dist/schema/base.d.ts:125


lastChild()

lastChild(): null | BlockModel<object>

Returns

null | BlockModel<object>

Inherited from

BlockModel.lastChild

Source

packages/framework/store/dist/schema/base.d.ts:127


lastItem()

lastItem(): null | BlockModel<object>

Returns

null | BlockModel<object>

Inherited from

BlockModel.lastItem

Source

packages/framework/store/dist/schema/base.d.ts:128