Skip to content

BlockSuite API Documentation / @blocksuite/blocks / EdgelessBlockModel

Class: EdgelessBlockModel<Props>

The graphic block model that can be rendered in the graphics mode. All the graphic block model should extend this class. You can use GfxCompatibleBlockModel to convert a BlockModel to a subclass that extends it.

Extends

Extended by

Type Parameters

Props extends GfxCompatibleProps = GfxCompatibleProps

Implements

  • GfxCompatibleInterface

Constructors

new EdgelessBlockModel()

new EdgelessBlockModel<Props>(): EdgelessBlockModel<Props>

Returns

EdgelessBlockModel<Props>

Inherited from

BlockModel<Props>.constructor

Defined in

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

Properties

[modelLabel]

[modelLabel]: Props

Inherited from

BlockModel.[modelLabel]

Defined in

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


childMap

childMap: ReadonlySignal<Map<string, number>>

Inherited from

BlockModel.childMap

Defined in

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


connectable

connectable: boolean

Defined in

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


created

created: Slot<void>

Inherited from

BlockModel.created

Defined in

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


deleted

deleted: Slot<void>

Inherited from

BlockModel.deleted

Defined in

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


flavour

flavour: string

Inherited from

BlockModel.flavour

Defined in

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


id

id: string

Inherited from

BlockModel.id

Defined in

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


index

index: string

Implementation of

GfxCompatibleInterface.index

Inherited from

BlockModel.index

Defined in

packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:13


index$

index$: Signal<Props["index"]>

Inherited from

BlockModel.index$


isEmpty

isEmpty: ReadonlySignal<boolean>

Inherited from

BlockModel.isEmpty

Defined in

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


keys

keys: string[]

Inherited from

BlockModel.keys

Defined in

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


page

page: Doc

Deprecated

use doc instead

Inherited from

BlockModel.page

Defined in

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


pop()

pop: (prop) => void

Parameters

prop: keyof Props & string

Returns

void

Inherited from

BlockModel.pop

Defined in

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


propsUpdated

propsUpdated: Slot<object>

Type declaration

key

key: string

Inherited from

BlockModel.propsUpdated

Defined in

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


role

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

Inherited from

BlockModel.role

Defined in

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


rotate

rotate: number

Implementation of

GfxCompatibleInterface.rotate

Defined in

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


stash()

stash: (prop) => void

Parameters

prop: keyof Props & string

Returns

void

Inherited from

BlockModel.stash

Defined in

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


text?

optional text: Text

Inherited from

BlockModel.text

Defined in

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


version

version: number

Inherited from

BlockModel.version

Defined in

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


xywh

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

Implementation of

GfxCompatibleInterface.xywh

Inherited from

BlockModel.xywh

Defined in

packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:12


xywh$

xywh$: Signal<Props["xywh"]>

Inherited from

BlockModel.xywh$


yBlock

yBlock: YBlock

Inherited from

BlockModel.yBlock

Defined in

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

Accessors

children

get children(): BlockModel<object, SignaledProps<object>>[]

Returns

BlockModel<object, SignaledProps<object>>[]

Inherited from

BlockModel.children

Defined in

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


deserializedXYWH

get deserializedXYWH(): XYWH

Returns

XYWH

Implementation of

GfxCompatibleInterface.deserializedXYWH

Defined in

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


doc

get doc(): Doc

set doc(doc): void

Parameters

doc: Doc

Returns

Doc

Inherited from

BlockModel.doc

Defined in

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


elementBound

get elementBound(): Bound

Returns

Bound

Implementation of

GfxCompatibleInterface.elementBound

Defined in

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


externalBound

get externalBound(): null | Bound

Returns

null | Bound

Defined in

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


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}]`

Defined in

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


group

get group(): null | GfxGroupModel

Returns

null | GfxGroupModel

Implementation of

GfxCompatibleInterface.group

Defined in

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


groups

get groups(): GfxGroupModel[]

Returns

GfxGroupModel[]

Implementation of

GfxCompatibleInterface.groups

Defined in

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


h

get h(): number

Returns

number

Implementation of

GfxCompatibleInterface.h

Defined in

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


parent

get parent(): null | BlockModel<object, SignaledProps<object>>

Returns

null | BlockModel<object, SignaledProps<object>>

Inherited from

BlockModel.parent

Defined in

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


surface

get surface(): null | SurfaceBlockModel

Returns

null | SurfaceBlockModel

Defined in

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


w

get w(): number

Returns

number

Implementation of

GfxCompatibleInterface.w

Defined in

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


x

get x(): number

Returns

number

Implementation of

GfxCompatibleInterface.x

Defined in

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


y

get y(): number

Returns

number

Implementation of

GfxCompatibleInterface.y

Defined in

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

Methods

[dispose]()

[dispose](): void

Returns

void

Inherited from

BlockModel.[dispose]

Defined in

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


containsBound()

containsBound(bounds): boolean

Parameters

bounds: Bound

Returns

boolean

Implementation of

GfxCompatibleInterface.containsBound

Defined in

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


dispose()

dispose(): void

Returns

void

Inherited from

BlockModel.dispose

Defined in

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


firstChild()

firstChild(): null | BlockModel<object, SignaledProps<object>>

Returns

null | BlockModel<object, SignaledProps<object>>

Inherited from

BlockModel.firstChild

Defined in

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


getLineIntersections()

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

Parameters

start: IVec

end: IVec

Returns

null | PointLocation[]

Implementation of

GfxCompatibleInterface.getLineIntersections

Defined in

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


getNearestPoint()

getNearestPoint(point): IVec

Parameters

point: IVec

Returns

IVec

Implementation of

GfxCompatibleInterface.getNearestPoint

Defined in

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


getRelativePointLocation()

getRelativePointLocation(relativePoint): PointLocation

Parameters

relativePoint: IVec

Returns

PointLocation

Implementation of

GfxCompatibleInterface.getRelativePointLocation

Defined in

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


includesPoint()

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

Parameters

x: number

y: number

_: PointTestOptions

__: EditorHost

Returns

boolean

Implementation of

GfxCompatibleInterface.includesPoint

Defined in

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


intersectsBound()

intersectsBound(bound): boolean

Parameters

bound: Bound

Returns

boolean

Implementation of

GfxCompatibleInterface.intersectsBound

Defined in

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


lastChild()

lastChild(): null | BlockModel<object, SignaledProps<object>>

Returns

null | BlockModel<object, SignaledProps<object>>

Inherited from

BlockModel.lastChild

Defined in

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