BlockSuite API Documentation / @blocksuite/blocks / EdgelessBlockModel
Class: EdgelessBlockModel<Props>
The graphic block model that can be rendered in the graphics mode. All the graphic block model should extend this class. You can use GfxCompatibleBlockModel
to convert a BlockModel to a subclass that extends it.
Extends
BlockModel
<Props
>
Extended by
AttachmentBlockModel
BookmarkBlockModel
EdgelessTextBlockModel
EmbedFigmaModel
EmbedGithubModel
EmbedHtmlModel
EmbedLinkedDocModel
EmbedLoomModel
EmbedSyncedDocModel
EmbedYoutubeModel
FrameBlockModel
ImageBlockModel
LatexBlockModel
NoteBlockModel
Type Parameters
• Props extends GfxCompatibleProps
= GfxCompatibleProps
Implements
GfxCompatibleInterface
Constructors
new EdgelessBlockModel()
new EdgelessBlockModel<
Props
>():EdgelessBlockModel
<Props
>
Returns
EdgelessBlockModel
<Props
>
Inherited from
BlockModel<Props>.constructor
Defined in
packages/framework/store/dist/schema/base.d.ts:129
Properties
[modelLabel]
[modelLabel]:
Props
Inherited from
BlockModel.[modelLabel]
Defined in
packages/framework/store/dist/schema/base.d.ts:115
childMap
childMap:
ReadonlySignal
<Map
<string
,number
>>
Inherited from
BlockModel.childMap
Defined in
packages/framework/store/dist/schema/base.d.ts:108
connectable
connectable:
boolean
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:33
created
created:
Slot
<void
>
Inherited from
BlockModel.created
Defined in
packages/framework/store/dist/schema/base.d.ts:109
deleted
deleted:
Slot
<void
>
Inherited from
BlockModel.deleted
Defined in
packages/framework/store/dist/schema/base.d.ts:110
flavour
flavour:
string
Inherited from
BlockModel.flavour
Defined in
packages/framework/store/dist/schema/base.d.ts:111
id
id:
string
Inherited from
BlockModel.id
Defined in
packages/framework/store/dist/schema/base.d.ts:112
index
index:
string
Implementation of
GfxCompatibleInterface.index
Inherited from
BlockModel.index
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:13
index$
index$:
Signal
<Props
["index"
]>
Inherited from
BlockModel.index$
isEmpty
isEmpty:
ReadonlySignal
<boolean
>
Inherited from
BlockModel.isEmpty
Defined in
packages/framework/store/dist/schema/base.d.ts:113
keys
keys:
string
[]
Inherited from
BlockModel.keys
Defined in
packages/framework/store/dist/schema/base.d.ts:114
lockedBySelf?
optional
lockedBySelf:boolean
Implementation of
GfxCompatibleInterface.lockedBySelf
Inherited from
BlockModel.lockedBySelf
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:14
lockedBySelf$
lockedBySelf$:
Signal
<Props
["lockedBySelf"
]>
Inherited from
BlockModel.lockedBySelf$
page
page:
Doc
Deprecated
use doc instead
Inherited from
BlockModel.page
Defined in
packages/framework/store/dist/schema/base.d.ts:104
pop()
pop: (
prop
) =>void
Parameters
prop
keyof Props
& string
Returns
void
Inherited from
BlockModel.pop
Defined in
packages/framework/store/dist/schema/base.d.ts:116
propsUpdated
propsUpdated:
Slot
<{key
:string
; }>
Inherited from
BlockModel.propsUpdated
Defined in
packages/framework/store/dist/schema/base.d.ts:117
role
role:
"root"
|"hub"
|"content"
Inherited from
BlockModel.role
Defined in
packages/framework/store/dist/schema/base.d.ts:120
rotate
rotate:
number
Implementation of
GfxCompatibleInterface.rotate
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:34
stash()
stash: (
prop
) =>void
Parameters
prop
keyof Props
& string
Returns
void
Inherited from
BlockModel.stash
Defined in
packages/framework/store/dist/schema/base.d.ts:121
text?
optional
text:Text
Inherited from
BlockModel.text
Defined in
packages/framework/store/dist/schema/base.d.ts:122
version
version:
number
Inherited from
BlockModel.version
Defined in
packages/framework/store/dist/schema/base.d.ts:123
xywh
xywh: `[${number},${number},${number},${number}]`
Implementation of
GfxCompatibleInterface.xywh
Inherited from
BlockModel.xywh
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:12
xywh$
xywh$:
Signal
<Props
["xywh"
]>
Inherited from
BlockModel.xywh$
yBlock
yBlock:
YBlock
Inherited from
BlockModel.yBlock
Defined in
packages/framework/store/dist/schema/base.d.ts:124
Accessors
children
Get Signature
get children():
BlockModel
<object
,SignaledProps
<object
>>[]
Returns
BlockModel
<object
, SignaledProps
<object
>>[]
Inherited from
BlockModel.children
Defined in
packages/framework/store/dist/schema/base.d.ts:125
deserializedXYWH
Get Signature
get deserializedXYWH():
XYWH
Returns
XYWH
Implementation of
GfxCompatibleInterface.deserializedXYWH
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:35
doc
Get Signature
get doc():
Doc
Returns
Set Signature
set doc(
doc
):void
Parameters
doc
Returns
void
Inherited from
BlockModel.doc
Defined in
packages/framework/store/dist/schema/base.d.ts:126
elementBound
Get Signature
get elementBound():
Bound
Returns
Bound
Implementation of
GfxCompatibleInterface.elementBound
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:36
externalBound
Get Signature
get externalBound():
null
|Bound
Returns
null
| Bound
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:37
externalXYWH
Get Signature
get externalXYWH():
undefined
| `[${number},${number},${number},${number}]`
Returns
undefined
| `[${number},${number},${number},${number}]`
Set Signature
set externalXYWH(
xywh
):void
Parameters
xywh
undefined
| `[${number},${number},${number},${number}]`
Returns
void
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:38
group
Get Signature
get group():
null
|GfxGroupModel
Returns
null
| GfxGroupModel
Implementation of
GfxCompatibleInterface.group
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:40
groups
Get Signature
get groups():
GfxGroupModel
[]
Returns
GfxGroupModel
[]
Implementation of
GfxCompatibleInterface.groups
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:41
h
Get Signature
get h():
number
Returns
number
Implementation of
GfxCompatibleInterface.h
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:42
parent
Get Signature
get parent():
null
|BlockModel
<object
,SignaledProps
<object
>>
Returns
null
| BlockModel
<object
, SignaledProps
<object
>>
Inherited from
BlockModel.parent
Defined in
packages/framework/store/dist/schema/base.d.ts:128
surface
Get Signature
get surface():
null
|SurfaceBlockModel
Returns
null
| SurfaceBlockModel
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:43
w
Get Signature
get w():
number
Returns
number
Implementation of
GfxCompatibleInterface.w
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:44
x
Get Signature
get x():
number
Returns
number
Implementation of
GfxCompatibleInterface.x
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:45
y
Get Signature
get y():
number
Returns
number
Implementation of
GfxCompatibleInterface.y
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:46
Methods
[dispose]()
[dispose]():
void
Returns
void
Inherited from
BlockModel.[dispose]
Defined in
packages/framework/store/dist/schema/base.d.ts:133
containsBound()
containsBound(
bounds
):boolean
Parameters
bounds
Bound
Returns
boolean
Implementation of
GfxCompatibleInterface.containsBound
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:47
dispose()
dispose():
void
Returns
void
Inherited from
BlockModel.dispose
Defined in
packages/framework/store/dist/schema/base.d.ts:130
firstChild()
firstChild():
null
|BlockModel
<object
,SignaledProps
<object
>>
Returns
null
| BlockModel
<object
, SignaledProps
<object
>>
Inherited from
BlockModel.firstChild
Defined in
packages/framework/store/dist/schema/base.d.ts:131
getLineIntersections()
getLineIntersections(
start
,end
):null
|PointLocation
[]
Parameters
start
IVec
end
IVec
Returns
null
| PointLocation
[]
Implementation of
GfxCompatibleInterface.getLineIntersections
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:48
getNearestPoint()
getNearestPoint(
point
):IVec
Parameters
point
IVec
Returns
IVec
Implementation of
GfxCompatibleInterface.getNearestPoint
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:49
getRelativePointLocation()
getRelativePointLocation(
relativePoint
):PointLocation
Parameters
relativePoint
IVec
Returns
PointLocation
Implementation of
GfxCompatibleInterface.getRelativePointLocation
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:50
includesPoint()
includesPoint(
x
,y
,_
,__
):boolean
Parameters
x
number
y
number
_
PointTestOptions
__
Returns
boolean
Implementation of
GfxCompatibleInterface.includesPoint
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:51
intersectsBound()
intersectsBound(
bound
):boolean
Parameters
bound
Bound
Returns
boolean
Implementation of
GfxCompatibleInterface.intersectsBound
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:52
isLocked()
isLocked():
boolean
Check if the element is locked. It will check the lock status of the element and its ancestors.
Returns
boolean
Implementation of
GfxCompatibleInterface.isLocked
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:53
isLockedByAncestor()
isLockedByAncestor():
boolean
Returns
boolean
Implementation of
GfxCompatibleInterface.isLockedByAncestor
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:54
isLockedBySelf()
isLockedBySelf():
boolean
Returns
boolean
Implementation of
GfxCompatibleInterface.isLockedBySelf
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:55
lastChild()
lastChild():
null
|BlockModel
<object
,SignaledProps
<object
>>
Returns
null
| BlockModel
<object
, SignaledProps
<object
>>
Inherited from
BlockModel.lastChild
Defined in
packages/framework/store/dist/schema/base.d.ts:132
lock()
lock():
void
Returns
void
Implementation of
GfxCompatibleInterface.lock
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:56
unlock()
unlock():
void
Returns
void
Implementation of
GfxCompatibleInterface.unlock
Defined in
packages/framework/block-std/dist/gfx/model/gfx-block-model.d.ts:57