Skip to content

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

Class: SurfaceSelection

Extends

Constructors

new SurfaceSelection(path, elements, editing, inoperable)

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

Parameters

path: string[]

elements: string[]

editing: boolean

inoperable: boolean= false

Returns

SurfaceSelection

Overrides

BaseSelection.constructor

Source

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

Properties

editing

readonly editing: boolean

Source

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


elements

readonly elements: string[]

Source

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


inoperable

readonly inoperable: boolean

Source

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


path

readonly path: string[]

Inherited from

BaseSelection.path

Source

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


group

static group: string = 'edgeless'

Overrides

BaseSelection.group

Source

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


type

static type: string = 'surface'

Overrides

BaseSelection.type

Source

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

Accessors

blockId

get blockId(): string

Returns

string

Source

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


group

get group(): string

Returns

string

Source

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


type

get type(): keyof Selection

Returns

keyof Selection

Source

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

Methods

equals()

equals(other): boolean

Parameters

other: BaseSelection

Returns

boolean

Overrides

BaseSelection.equals

Source

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


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

Source

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


isEmpty()

isEmpty(): boolean

Returns

boolean

Source

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


toJSON()

toJSON(): Record<string, unknown>

Returns

Record<string, unknown>

Overrides

BaseSelection.toJSON

Source

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


fromJSON()

static fromJSON(json): SurfaceSelection

Parameters

json: Record<string, unknown> | object

Returns

SurfaceSelection

Overrides

BaseSelection.fromJSON

Source

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