Skip to content

BlockSuite API Documentation / @blocksuite/block-std / SurfaceSelection

Class: SurfaceSelection

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:11

Extends

Constructors

new SurfaceSelection()

new SurfaceSelection(blockId, elements, editing, inoperable): SurfaceSelection

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:22

Parameters

blockId

string

elements

string[]

editing

boolean

inoperable

boolean = false

Returns

SurfaceSelection

Overrides

BaseSelection.constructor

Properties

blockId

readonly blockId: string

Defined in: packages/framework/store/dist/extension/selection/base.d.ts:8

Inherited from

BaseSelection.blockId


editing

readonly editing: boolean

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:16


elements

readonly elements: string[]

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:18


inoperable

readonly inoperable: boolean

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:20


group

static group: string = 'gfx'

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:12

Overrides

BaseSelection.group


type

static type: string = 'surface'

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:14

Overrides

BaseSelection.type

Accessors

group

Get Signature

get group(): string

Defined in: packages/framework/store/dist/extension/selection/base.d.ts:9

Returns

string

Inherited from

BaseSelection.group


type

Get Signature

get type(): string

Defined in: packages/framework/store/dist/extension/selection/base.d.ts:10

Returns

string

Inherited from

BaseSelection.type

Methods

equals()

equals(other): boolean

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:41

Parameters

other

BaseSelection

Returns

boolean

Overrides

BaseSelection.equals


is()

is<T>(type): this is T extends SelectionConstructor<U> ? U : never

Defined in: packages/framework/store/dist/extension/selection/base.d.ts:14

Type Parameters

T

T extends SelectionConstructor<BaseSelection>

Parameters

type

T

Returns

this is T extends SelectionConstructor<U> ? U : never

Inherited from

BaseSelection.is


isEmpty()

isEmpty(): boolean

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:55

Returns

boolean


toJSON()

toJSON(): Record<string, unknown>

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:59

Returns

Record<string, unknown>

Overrides

BaseSelection.toJSON


fromJSON()

static fromJSON(json): SurfaceSelection

Defined in: packages/framework/block-std/src/selection/variants/surface.ts:35

Parameters

json

Record<string, unknown>

Returns

SurfaceSelection

Overrides

BaseSelection.fromJSON