API > @blocksuite/block-std > SurfaceSelection
Class: SurfaceSelection ​
Extends ​
Constructors ​
constructor ​
new SurfaceSelection(
elements,editing):SurfaceSelection
Parameters ​
| Parameter | Type | 
|---|---|
elements | string[] | 
editing | boolean | 
Returns ​
Overrides ​
Defined In ​
block-std/src/selection/variants/surface.ts:17
Properties ​
editing ​
readonlyediting:boolean
Defined In ​
block-std/src/selection/variants/surface.ts:15
elements ​
readonlyelements:string[]
Defined In ​
block-std/src/selection/variants/surface.ts:14
path ​
readonlypath:string[]
Defined In ​
block-std/src/selection/base.ts:16
Inherited from ​
group ​
staticgroup:string='edgeless'
Defined In ​
block-std/src/selection/variants/surface.ts:12
Overrides ​
type ​
statictype:string='surface'
Defined In ​
block-std/src/selection/variants/surface.ts:11
Overrides ​
Accessors ​
blockId ​
getblockId():string
Defined In ​
block-std/src/selection/base.ts:22
Inherited from ​
group ​
getgroup():string
Defined In ​
block-std/src/selection/base.ts:37
Inherited from ​
type ​
gettype(): keyofSelection
Defined In ​
block-std/src/selection/base.ts:32
Inherited from ​
Methods ​
equals ​
equals(
other):boolean
Parameters ​
| Parameter | Type | 
|---|---|
other | BaseSelection | 
Returns ​
boolean
Overrides ​
Defined In ​
block-std/src/selection/variants/surface.ts:27
is ​
is<
T>(type):this is SelectionInstance[T]
Type parameters ​
| Parameter | 
|---|
T extends keyof Selection | 
Parameters ​
| Parameter | Type | 
|---|---|
type | T | 
Returns ​
this is SelectionInstance[T]
Inherited from ​
Defined In ​
block-std/src/selection/base.ts:26
isEmpty ​
isEmpty():
boolean
Returns ​
boolean
Defined In ​
block-std/src/selection/variants/surface.ts:23
toJSON ​
toJSON():
Record<string,unknown>
Returns ​
Record< string, unknown >
Overrides ​
Defined In ​
block-std/src/selection/variants/surface.ts:40
fromJSON ​
staticfromJSON(json):SurfaceSelection
Parameters ​
| Parameter | Type | 
|---|---|
json | Record< string, unknown > | {editing: boolean; elements: string[];} | 
Returns ​
Overrides ​
Defined In ​
block-std/src/selection/variants/surface.ts:49