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
Overrides
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:23
Properties
blockId
readonly
blockId:string
Inherited from
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:17
elements
readonly
elements:string
[]
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:19
inoperable
readonly
inoperable:boolean
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:21
group
static
group:string
='gfx'
Overrides
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:13
type
static
type:string
='surface'
Overrides
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:15
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/surface.ts:42
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
isEmpty()
isEmpty():
boolean
Returns
boolean
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:56
toJSON()
toJSON():
Record
<string
,unknown
>
Returns
Record
<string
, unknown
>
Overrides
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:60
fromJSON()
static
fromJSON(json
):SurfaceSelection
Parameters
• json: Record
<string
, unknown
>
Returns
Overrides
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:36