Skip to content

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

Class: SurfaceSelection

Extends

Constructors

new SurfaceSelection()

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

Parameters

blockId: string

elements: string[]

editing: boolean

inoperable: boolean = false

Returns

SurfaceSelection

Overrides

BaseSelection.constructor

Defined in

packages/framework/block-std/src/selection/variants/surface.ts:24

Properties

blockId

readonly blockId: string

Inherited from

BaseSelection.blockId

Defined in

packages/framework/block-std/src/selection/base.ts:18


editing

readonly editing: boolean

Defined in

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


elements

readonly elements: string[]

Defined in

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


inoperable

readonly inoperable: boolean

Defined in

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


group

static group: string = 'gfx'

Overrides

BaseSelection.group

Defined in

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


type

static type: string = 'surface'

Overrides

BaseSelection.type

Defined in

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

Accessors

group

get group(): string

Returns

string

Inherited from

BaseSelection.group

Defined in

packages/framework/block-std/src/selection/base.ts:20


type

get type(): keyof Selection

Returns

keyof Selection

Inherited from

BaseSelection.type

Defined in

packages/framework/block-std/src/selection/base.ts:24

Methods

equals()

equals(other): boolean

Parameters

other: BaseSelection

Returns

boolean

Overrides

BaseSelection.equals

Defined in

packages/framework/block-std/src/selection/variants/surface.ts:43


is()

is<T>(type): this is SelectionInstance[T]

Type Parameters

T extends keyof Selection

Parameters

type: T

Returns

this is SelectionInstance[T]

Inherited from

BaseSelection.is

Defined in

packages/framework/block-std/src/selection/base.ts:42


isEmpty()

isEmpty(): boolean

Returns

boolean

Defined in

packages/framework/block-std/src/selection/variants/surface.ts:57


toJSON()

toJSON(): Record<string, unknown>

Returns

Record<string, unknown>

Overrides

BaseSelection.toJSON

Defined in

packages/framework/block-std/src/selection/variants/surface.ts:61


fromJSON()

static fromJSON(json): SurfaceSelection

Parameters

json: Record<string, unknown>

Returns

SurfaceSelection

Overrides

BaseSelection.fromJSON

Defined in

packages/framework/block-std/src/selection/variants/surface.ts:37