Skip to content

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

Class: CursorSelection

Extends

Constructors

new CursorSelection()

new CursorSelection(x, y): CursorSelection

Parameters

x

number

y

number

Returns

CursorSelection

Overrides

BaseSelection.constructor

Defined in

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

Properties

blockId

readonly blockId: string

Inherited from

BaseSelection.blockId

Defined in

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


x

readonly x: number

Defined in

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


y

readonly y: number

Defined in

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


group

static group: string = 'gfx'

Overrides

BaseSelection.group

Defined in

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


type

static type: string = 'cursor'

Overrides

BaseSelection.type

Defined in

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

Accessors

group

Get Signature

get group(): string

Returns

string

Inherited from

BaseSelection.group

Defined in

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


type

Get Signature

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/cursor.ts:31


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


toJSON()

toJSON(): Record<string, unknown>

Returns

Record<string, unknown>

Overrides

BaseSelection.toJSON

Defined in

packages/framework/block-std/src/selection/variants/cursor.ts:38


fromJSON()

static fromJSON(json): CursorSelection

Parameters

json

Record<string, unknown>

Returns

CursorSelection

Overrides

BaseSelection.fromJSON

Defined in

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