API > @blocksuite/blocks > GroupElement
Class: GroupElement ​
Extends ​
SurfaceElement
<IGroup
,IGroupLocalRecord
>
Constructors ​
constructor ​
new GroupElement(
yMap
,options
,data
={}
):GroupElement
Parameters ​
Parameter | Type |
---|---|
yMap | Map < unknown > |
options | object |
options.getGroupParent | function |
options.getLocalRecord | function |
options.onElementUpdated | function |
options.pickById | function |
options.selectionManager ? | EdgelessSelectionManager |
options.setGroupParent | function |
options.updateElementLocalRecord | function |
data | Partial < IGroup > |
Returns ​
Inherited from ​
SurfaceElement<IGroup, IGroupLocalRecord>.constructor
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:95
Properties ​
_cachedChildren ​
private
_cachedChildren:string
[] =[]
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:22
_connectable ​
protected
_connectable:boolean
=false
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:28
Overrides ​
SurfaceElement._connectable
_padding ​
private
_padding:number
[]
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:26
_radius ​
private
_radius:number
=0
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:27
_titleHeight ​
private
_titleHeight:number
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:24
_titleWidth ​
private
_titleWidth:number
=0
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:25
computedValue ​
computedValue:
ComputedValue
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:93
Inherited from ​
SurfaceElement.computedValue
options ​
protected
options:object
Type declaration ​
options.getGroupParent
​getGroupParent:
function
Parameters ​
Parameter Type element
string
|EdgelessElement
Returns ​
options.getLocalRecord
​getLocalRecord:
function
Parameters ​
Parameter Type id
string
Returns ​
undefined
|IShapeLocalRecord
|ISurfaceElementLocalRecord
options.onElementUpdated
​onElementUpdated:
function
Parameters ​
Parameter Type update
object
update.id
string
update.props
object
Returns ​
void
options.pickById
​pickById:
function
Parameters ​
Parameter Type id
string
Returns ​
null
|EdgelessElement
options.selectionManager
​
optional
selectionManager:EdgelessSelectionManager
options.setGroupParent
​setGroupParent:
function
Parameters ​
Parameter Type element
string
|EdgelessElement
group
GroupElement
Returns ​
void
options.updateElementLocalRecord
​updateElementLocalRecord:
function
Parameters ​
Parameter Type id
string
record
Record
<string
,unknown
>Returns ​
void
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:70
Inherited from ​
SurfaceElement.options
renderer ​
protected
renderer:null
|Renderer
=null
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:90
Inherited from ​
SurfaceElement.renderer
yMap ​
yMap:
Map
<unknown
>
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:68
Inherited from ​
SurfaceElement.yMap
Accessors ​
_children ​
private
get
_children():string
[]
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:91
batch ​
get
batch():null
|NonNullable
<T
["batch"
] >
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:144
Inherited from ​
SurfaceElement.batch
childElements ​
get
childElements():EdgelessElement
[]
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:95
children ​
get
children():Map
<boolean
>
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:87
connectable ​
get
connectable():boolean
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:179
Inherited from ​
SurfaceElement.connectable
gridBound ​
get
gridBound():Bound
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:125
Overrides ​
SurfaceElement.gridBound
h ​
get
h():number
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:170
Inherited from ​
SurfaceElement.h
id ​
get
id():T
["id"
]
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:114
Inherited from ​
SurfaceElement.id
index ​
get
index():T
["index"
]
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:119
Inherited from ​
SurfaceElement.index
localRecord ​
get
localRecord():undefined
|IShapeLocalRecord
|ISurfaceElementLocalRecord
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:175
Inherited from ​
SurfaceElement.localRecord
padding ​
get
padding():number
[]
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:107
radius ​
get
radius():number
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:111
rotate ​
get
rotate():T
["rotate"
]
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:139
Inherited from ​
SurfaceElement.rotate
seed ​
get
seed():T
["seed"
]
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:134
Inherited from ​
SurfaceElement.seed
title ​
get
title():Text
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:83
titleBound ​
get
titleBound():Bound
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:115
titleHeight ​
get
titleHeight():number
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:99
titleWidth ​
get
titleWidth():number
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:103
type ​
get
type():T
["type"
]
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:124
Inherited from ​
SurfaceElement.type
w ​
get
w():number
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:165
Inherited from ​
SurfaceElement.w
x ​
get
x():number
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:155
Inherited from ​
SurfaceElement.x
xywh ​
get
xywh(): `[${number},${number},${number},${number}]`
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:70
Overrides ​
SurfaceElement.xywh
y ​
get
y():number
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:160
Inherited from ​
SurfaceElement.y
Methods ​
_renderTitle ​
private
_renderTitle(ctx
):void
Parameters ​
Parameter | Type |
---|---|
ctx | CanvasRenderingContext2D |
Returns ​
void
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:154
applyUpdate ​
applyUpdate(
updates
):void
Parameters ​
Parameter | Type |
---|---|
updates | Partial < IGroup > |
Returns ​
void
Inherited from ​
SurfaceElement.applyUpdate
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:187
boxSelect ​
boxSelect(
bound
):boolean
Parameters ​
Parameter | Type |
---|---|
bound | Bound |
Returns ​
boolean
Inherited from ​
SurfaceElement.boxSelect
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:59
containedByBounds ​
containedByBounds(
bound
):boolean
Parameters ​
Parameter | Type |
---|---|
bound | Bound |
Returns ​
boolean
Overrides ​
SurfaceElement.containedByBounds
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:30
deserializeXYWH ​
deserializeXYWH():
XYWH
Returns ​
Inherited from ​
SurfaceElement.deserializeXYWH
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:193
getLocalRecord ​
getLocalRecord():
IGroupLocalRecord
Returns ​
IGroupLocalRecord
Inherited from ​
SurfaceElement.getLocalRecord
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:183
getNearestPoint ​
getNearestPoint(
_
):IVec
Parameters ​
Parameter | Type |
---|---|
_ | IVec |
Returns ​
Inherited from ​
SurfaceElement.getNearestPoint
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:50
getRelativePointLocation ​
getRelativePointLocation(
_
):PointLocation
Parameters ​
Parameter | Type |
---|---|
_ | IVec |
Returns ​
Inherited from ​
SurfaceElement.getRelativePointLocation
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:56
hitTest ​
hitTest(
x
,y
,_options
?):boolean
Parameters ​
Parameter | Type |
---|---|
x | number |
y | number |
_options ? | HitTestOptions |
Returns ​
boolean
Overrides ​
SurfaceElement.hitTest
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:203
init ​
init():
void
Returns ​
void
Overrides ​
SurfaceElement.init
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:39
intersectWithLine ​
intersectWithLine(
start
,end
):null
|PointLocation
[]
Parameters ​
Parameter | Type |
---|---|
start | IVec |
end | IVec |
Returns ​
null
| PointLocation
[]
Overrides ​
SurfaceElement.intersectWithLine
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:34
mount ​
mount(
renderer
):void
Parameters ​
Parameter | Type |
---|---|
renderer | Renderer |
Returns ​
void
Inherited from ​
SurfaceElement.mount
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:219
render ​
render(
_ctx
,_matrix
,_rc
):void
Parameters ​
Parameter | Type |
---|---|
_ctx | CanvasRenderingContext2D |
_matrix | DOMMatrix |
_rc | RoughCanvas |
Returns ​
void
Overrides ​
SurfaceElement.render
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:132
serialize ​
serialize():
IGroup
Returns ​
IGroup
Inherited from ​
SurfaceElement.serialize
Defined In ​
packages/blocks/src/surface-block/elements/surface-element.ts:197
unmount ​
unmount():
void
Returns ​
void
Overrides ​
SurfaceElement.unmount
Defined In ​
packages/blocks/src/surface-block/elements/group/group-element.ts:218