BlockSuite API Documentation / @blocksuite/block-std / CursorSelection
Class: CursorSelection
Extends
Constructors
new CursorSelection()
new CursorSelection(
x
,y
):CursorSelection
Parameters
• x: number
• y: number
Returns
Overrides
Defined in
packages/framework/block-std/src/selection/variants/cursor.ts:19
Properties
blockId
readonly
blockId:string
Inherited from
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:15
y
readonly
y:number
Defined in
packages/framework/block-std/src/selection/variants/cursor.ts:17
group
static
group:string
='gfx'
Overrides
Defined in
packages/framework/block-std/src/selection/variants/cursor.ts:11
type
static
type:string
='cursor'
Overrides
Defined in
packages/framework/block-std/src/selection/variants/cursor.ts:13
Accessors
group
get
group():string
Returns
string
Inherited from
Defined in
packages/framework/block-std/src/selection/base.ts:20
type
get
type(): keyofSelection
Returns
keyof Selection
Inherited from
Defined in
packages/framework/block-std/src/selection/base.ts:24
Methods
equals()
equals(
other
):boolean
Parameters
• other: BaseSelection
Returns
boolean
Overrides
Defined in
packages/framework/block-std/src/selection/variants/cursor.ts:30
is()
is<
T
>(type
):this is SelectionInstance[T]
Type Parameters
• T extends keyof Selection
Parameters
• type: T
Returns
this is SelectionInstance[T]
Inherited from
Defined in
packages/framework/block-std/src/selection/base.ts:42
toJSON()
toJSON():
Record
<string
,unknown
>
Returns
Record
<string
, unknown
>
Overrides
Defined in
packages/framework/block-std/src/selection/variants/cursor.ts:37
fromJSON()
static
fromJSON(json
):CursorSelection
Parameters
• json: Record
<string
, unknown
>
Returns
Overrides
Defined in
packages/framework/block-std/src/selection/variants/cursor.ts:25