BlockSuite API Documentation / @blocksuite/blocks / GroupElementModel
Class: GroupElementModel
Contents
Extends
ElementModel
<GroupElementProps
>
Constructors
new GroupElementModel(options)
new GroupElementModel(
options
):GroupElementModel
Parameters
• options: Object
• options.model: SurfaceBlockModel
• options.onchange: (props
) => void
• options.stashedStore: Map
<unknown
, unknown
>
• options.yMap: Map
<unknown
>
Returns
Inherited from
ElementModel<GroupElementProps>.constructor
Source
packages/blocks/src/surface-block/element-model/base.ts:36
Properties
_onchange?
protected
_onchange?: (props
) =>void
Parameters
• props: Record
<string
, Object
>
Returns
void
Inherited from
ElementModel._onchange
Source
packages/blocks/src/surface-block/element-model/base.ts:22
children
children:
Map
<boolean
>
Source
packages/blocks/src/surface-block/element-model/group.ts:35
index
index:
string
='a0'
Inherited from
ElementModel.index
Source
packages/blocks/src/surface-block/element-model/base.ts:34
surfaceModel
surfaceModel:
SurfaceBlockModel
Inherited from
ElementModel.surfaceModel
Source
packages/blocks/src/surface-block/element-model/base.ts:25
title
title:
Text
Source
packages/blocks/src/surface-block/element-model/group.ts:38
yMap
yMap:
Map
<unknown
>
Inherited from
ElementModel.yMap
Source
packages/blocks/src/surface-block/element-model/base.ts:24
Accessors
childrenElements
get
childrenElements(): (BaseBlockModel
<object
> |ElementModel
<BaseProps
>)[]
Returns
(BaseBlockModel
<object
> | ElementModel
<BaseProps
>)[]
Source
packages/blocks/src/surface-block/element-model/group.ts:78
childrenIds
get
childrenIds():string
[]
Returns
string
[]
Source
packages/blocks/src/surface-block/element-model/group.ts:74
deserializedXYWH
get
deserializedXYWH():XYWH
Returns
XYWH
Source
packages/blocks/src/surface-block/element-model/base.ts:50
elementBound
get
elementBound():Bound
Returns
Source
packages/blocks/src/surface-block/element-model/base.ts:78
group
get
group():null
|GroupElementModel
Returns
null
| GroupElementModel
Source
packages/blocks/src/surface-block/element-model/base.ts:70
h
get
h():number
Returns
number
Source
packages/blocks/src/surface-block/element-model/base.ts:66
id
get
id():string
Returns
string
Source
packages/blocks/src/surface-block/element-model/base.ts:74
rotate
get
rotate():number
set
rotate(_
):void
Parameters
• _: number
Returns
number
Source
packages/blocks/src/surface-block/element-model/group.ts:64
type
get
type():string
Returns
string
Source
packages/blocks/src/surface-block/element-model/group.ts:70
w
get
w():number
Returns
number
Source
packages/blocks/src/surface-block/element-model/base.ts:62
x
get
x():number
Returns
number
Source
packages/blocks/src/surface-block/element-model/base.ts:54
xywh
get
xywh(): `[${number},${number},${number},${number}]`
set
xywh(_
):void
Parameters
• _: `[${number},${number},${number},${number}]`
Returns
`[${number},${number},${number},${number}]`
Source
packages/blocks/src/surface-block/element-model/group.ts:40
y
get
y():number
Returns
number
Source
packages/blocks/src/surface-block/element-model/base.ts:58
Methods
pop()
pop(
prop
):void
Parameters
• prop: "children"
| "title"
| "index"
Returns
void
Inherited from
ElementModel.pop
Source
packages/blocks/src/surface-block/element-model/base.ts:94
stash()
stash(
prop
):void
Parameters
• prop: "children"
| "title"
| "index"
Returns
void
Inherited from
ElementModel.stash
Source
packages/blocks/src/surface-block/element-model/base.ts:86
propsToYStruct()
static
propsToYStruct(props
):GroupElementProps
Parameters
• props: GroupElementProps
Returns
GroupElementProps
Overrides
ElementModel.propsToYStruct
Source
packages/blocks/src/surface-block/element-model/group.ts:16
Generated using typedoc-plugin-markdown and TypeDoc