Skip to content

BlockSuite API Documentation / @blocksuite/blocks / NoteBlockModel

Class: NoteBlockModel

Extends

Constructors

new NoteBlockModel(undefined)

new NoteBlockModel(): NoteBlockModel

Returns

NoteBlockModel

Inherited from

@blocksuite/blocks.EdgelessBlock.constructor

Source

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

Properties

[modelLabel]

[modelLabel]: NoteProps

Inherited from

@blocksuite/blocks.EdgelessBlock.[modelLabel]

Source

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


background

background: string

Inherited from

selectable<NoteProps>(BlockModel).background

Source

packages/blocks/src/note-block/note-model.ts:59


childrenUpdated

childrenUpdated: Slot<void>

Inherited from

@blocksuite/blocks.EdgelessBlock.childrenUpdated

Source

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


connectable

connectable: boolean = true

Inherited from

@blocksuite/blocks.EdgelessBlock.connectable

Source

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


created

created: Slot<void>

Inherited from

@blocksuite/blocks.EdgelessBlock.created

Source

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


deleted

deleted: Slot<void>

Inherited from

@blocksuite/blocks.EdgelessBlock.deleted

Source

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


displayMode

displayMode: NoteDisplayMode

Inherited from

selectable<NoteProps>(BlockModel).displayMode

Source

packages/blocks/src/note-block/note-model.ts:61


edgeless

edgeless: NoteEdgelessProps

Inherited from

selectable<NoteProps>(BlockModel).edgeless

Source

packages/blocks/src/note-block/note-model.ts:62


flavour

flavour: string

Inherited from

@blocksuite/blocks.EdgelessBlock.flavour

Source

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


hidden

hidden: boolean

Deprecated

use displayMode instead hidden:true -> displayMode:NoteDisplayMode.EdgelessOnly: means the note is visible only in the edgeless mode hidden:false -> displayMode:NoteDisplayMode.DocAndEdgeless: means the note is visible in the doc and edgeless mode

Inherited from

selectable<NoteProps>(BlockModel).hidden

Source

packages/blocks/src/note-block/note-model.ts:71


id

id: string

Inherited from

@blocksuite/blocks.EdgelessBlock.id

Source

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


index

index: string

Inherited from

@blocksuite/blocks.EdgelessBlock.index

Source

packages/blocks/src/note-block/note-model.ts:60


keys

keys: string[]

Inherited from

@blocksuite/blocks.EdgelessBlock.keys

Source

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


page

page: Doc

Deprecated

use doc instead

Inherited from

@blocksuite/blocks.EdgelessBlock.page

Source

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


pop

pop: (prop) => void

Parameters

prop: "xywh" | "index" | "background" | "displayMode" | "edgeless" | "hidden"

Returns

void

Inherited from

@blocksuite/blocks.EdgelessBlock.pop

Source

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


propsUpdated

propsUpdated: Slot<Object>

Type declaration

key

key: string

Inherited from

@blocksuite/blocks.EdgelessBlock.propsUpdated

Source

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


role

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

Inherited from

@blocksuite/blocks.EdgelessBlock.role

Source

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


rotate

rotate: number = 0

Inherited from

@blocksuite/blocks.EdgelessBlock.rotate

Source

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


stash

stash: (prop) => void

Parameters

prop: "xywh" | "index" | "background" | "displayMode" | "edgeless" | "hidden"

Returns

void

Inherited from

@blocksuite/blocks.EdgelessBlock.stash

Source

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


text?

text?: Text

Inherited from

@blocksuite/blocks.EdgelessBlock.text

Source

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


version

version: number

Inherited from

@blocksuite/blocks.EdgelessBlock.version

Source

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


xywh

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

Inherited from

@blocksuite/blocks.EdgelessBlock.xywh

Source

packages/blocks/src/note-block/note-model.ts:58


yBlock

yBlock: YBlock

Inherited from

@blocksuite/blocks.EdgelessBlock.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

_isSelectable()

private _isSelectable(): boolean

Returns

boolean

Source

packages/blocks/src/note-block/note-model.ts:87


boxSelect()

boxSelect(bound): boolean

Parameters

bound: Bound

Returns

boolean

Overrides

@blocksuite/blocks.EdgelessBlock.boxSelect

Source

packages/blocks/src/note-block/note-model.ts:103


containedByBounds()

containedByBounds(bounds): boolean

Parameters

bounds: Bound

Returns

boolean

Overrides

@blocksuite/blocks.EdgelessBlock.containedByBounds

Source

packages/blocks/src/note-block/note-model.ts:98


dispose()

dispose(): void

Returns

void

Inherited from

@blocksuite/blocks.EdgelessBlock.dispose

Source

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


firstChild()

firstChild(): null | BlockModel<object>

Returns

null | BlockModel<object>

Inherited from

@blocksuite/blocks.EdgelessBlock.firstChild

Source

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


getNearestPoint()

getNearestPoint(point): IVec

Parameters

point: IVec

Returns

IVec

Inherited from

@blocksuite/blocks.EdgelessBlock.getNearestPoint

Source

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


getRelativePointLocation()

getRelativePointLocation(relativePoint): PointLocation

Parameters

relativePoint: IVec

Returns

PointLocation

Inherited from

@blocksuite/blocks.EdgelessBlock.getRelativePointLocation

Source

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


hitTest()

hitTest(x, y): boolean

Parameters

x: number

y: number

Returns

boolean

Overrides

@blocksuite/blocks.EdgelessBlock.hitTest

Source

packages/blocks/src/note-block/note-model.ts:91


intersectWithLine()

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

Parameters

start: IVec

end: IVec

Returns

null | PointLocation[]

Inherited from

@blocksuite/blocks.EdgelessBlock.intersectWithLine

Source

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


isEmpty()

isEmpty(): boolean

Returns

boolean

Inherited from

@blocksuite/blocks.EdgelessBlock.isEmpty

Source

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


lastChild()

lastChild(): null | BlockModel<object>

Returns

null | BlockModel<object>

Inherited from

@blocksuite/blocks.EdgelessBlock.lastChild

Source

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


lastItem()

lastItem(): null | BlockModel<object>

Returns

null | BlockModel<object>

Inherited from

@blocksuite/blocks.EdgelessBlock.lastItem

Source

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


Generated using TypeDoc and typedoc-plugin-markdown.