Skip to content

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

Class: CursorSelection

Extends

Constructors

new CursorSelection(x, y)

new CursorSelection(x, y): CursorSelection

Parameters

x: number

y: number

Returns

CursorSelection

Overrides

BaseSelection.constructor

Source

block-std/src/selection/variants/cursor.ts:17

Properties

path

readonly path: string[]

Inherited from

BaseSelection.path

Source

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


x

readonly x: number

Source

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


y

readonly y: number

Source

block-std/src/selection/variants/cursor.ts:15


group

static group: string = 'edgeless'

Overrides

BaseSelection.group

Source

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


type

static type: string = 'cursor'

Overrides

BaseSelection.type

Source

block-std/src/selection/variants/cursor.ts:11

Accessors

blockId

get blockId(): string

Returns

string

Source

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


group

get group(): string

Returns

string

Source

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


type

get type(): keyof Selection

Returns

keyof Selection

Source

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

Methods

equals()

equals(other): boolean

Parameters

other: BaseSelection

Returns

boolean

Overrides

BaseSelection.equals

Source

block-std/src/selection/variants/cursor.ts:23


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

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


toJSON()

toJSON(): Record<string, unknown>

Returns

Record<string, unknown>

Overrides

BaseSelection.toJSON

Source

block-std/src/selection/variants/cursor.ts:31


fromJSON()

static fromJSON(json): CursorSelection

Parameters

json: Record<string, unknown>

Returns

CursorSelection

Overrides

BaseSelection.fromJSON

Source

block-std/src/selection/variants/cursor.ts:39