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:24
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:18
elements
readonly
elements:string
[]
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:20
inoperable
readonly
inoperable:boolean
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:22
group
static
group:string
='gfx'
Overrides
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:14
type
static
type:string
='surface'
Overrides
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:16
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:43
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:57
toJSON()
toJSON():
Record
<string
,unknown
>
Returns
Record
<string
, unknown
>
Overrides
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:61
fromJSON()
static
fromJSON(json
):SurfaceSelection
Parameters
• json: Record
<string
, unknown
>
Returns
Overrides
Defined in
packages/framework/block-std/src/selection/variants/surface.ts:37