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
Source
packages/framework/block-std/src/selection/variants/surface.ts:19
Properties
blockId
readonly
blockId:string
Inherited from
Source
packages/framework/block-std/src/selection/base.ts:14
editing
readonly
editing:boolean
Source
packages/framework/block-std/src/selection/variants/surface.ts:16
elements
readonly
elements:string
[]
Source
packages/framework/block-std/src/selection/variants/surface.ts:15
inoperable
readonly
inoperable:boolean
Source
packages/framework/block-std/src/selection/variants/surface.ts:17
group
static
group:string
='edgeless'
Overrides
Source
packages/framework/block-std/src/selection/variants/surface.ts:13
type
static
type:string
='surface'
Overrides
Source
packages/framework/block-std/src/selection/variants/surface.ts:12
Accessors
group
get
group():string
Returns
string
Source
packages/framework/block-std/src/selection/base.ts:31
type
get
type(): keyofSelection
Returns
keyof Selection
Source
packages/framework/block-std/src/selection/base.ts:26
Methods
equals()
equals(
other
):boolean
Parameters
• other: BaseSelection
Returns
boolean
Overrides
Source
packages/framework/block-std/src/selection/variants/surface.ts:36
is()
is<
T
>(type
):this is SelectionInstance[T]
Type parameters
• T extends keyof Selection
Parameters
• type: T
Returns
this is SelectionInstance[T]
Inherited from
Source
packages/framework/block-std/src/selection/base.ts:20
isEmpty()
isEmpty():
boolean
Returns
boolean
Source
packages/framework/block-std/src/selection/variants/surface.ts:32
toJSON()
toJSON():
Record
<string
,unknown
>
Returns
Record
<string
, unknown
>
Overrides
Source
packages/framework/block-std/src/selection/variants/surface.ts:50
fromJSON()
static
fromJSON(json
):SurfaceSelection
Parameters
• json: Record
<string
, unknown
> | object
Returns
Overrides
Source
packages/framework/block-std/src/selection/variants/surface.ts:60