BlockSuite API Documentation / @blocksuite/blocks / EdgelessPageService
Class: EdgelessPageService
Extends
Constructors
new EdgelessPageService(options)
new EdgelessPageService(
options
):EdgelessPageService
Parameters
• options: BlockServiceOptions
Returns
Inherited from
@blocksuite/blocks.PageService.constructor
Source
packages/block-std/dist/service/index.d.ts:13
Properties
TemplateJob
TemplateJob: typeof
TemplateJob
=TemplateJob
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:37
_layer
private
_layer:LayerManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:40
_selection
private
_selection:EdgelessSelectionManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:41
_surface
private
_surface:SurfaceBlockModel
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:39
_tool
private
_tool:EdgelessToolsManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:43
_viewport
private
_viewport:Viewport
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:42
disposables
readonly
disposables:DisposableGroup
Inherited from
@blocksuite/blocks.PageService.disposables
Source
packages/block-std/dist/service/index.d.ts:12
editSession
readonly
editSession:EditSessionStorage
Inherited from
@blocksuite/blocks.PageService.editSession
Source
packages/blocks/src/page-block/page-service.ts:44
exportManager
exportManager:
ExportManager
Inherited from
@blocksuite/blocks.PageService.exportManager
Source
packages/blocks/src/page-block/page-service.ts:47
fileDropManager
fileDropManager:
FileDropManager
Inherited from
@blocksuite/blocks.PageService.fileDropManager
Source
packages/blocks/src/page-block/page-service.ts:46
flavour
readonly
flavour:string
Inherited from
@blocksuite/blocks.PageService.flavour
Source
packages/block-std/dist/service/index.d.ts:11
fontLoader
readonly
fontLoader:FontLoader
Inherited from
@blocksuite/blocks.PageService.fontLoader
Source
packages/blocks/src/page-block/page-service.ts:43
std
readonly
std:BlockStdScope
Inherited from
@blocksuite/blocks.PageService.std
Source
packages/block-std/dist/service/index.d.ts:10
Accessors
blocks
get
blocks():EdgelessBlock
<EdgelessSelectableProps
>[]
Returns
EdgelessBlock
<EdgelessSelectableProps
>[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:102
elements
get
elements():ElementModel
<BaseProps
>[]
sorted canvas elements
Returns
ElementModel
<BaseProps
>[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:94
frames
get
frames():FrameBlockModel
[]
Returns
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:98
layer
get
layer():LayerManager
Returns
LayerManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:79
page
get
page():Page
Returns
Source
packages/block-std/dist/service/index.d.ts:15
selectedBlocks
get
selectedBlocks():BlockElement
<BlockModel
<object
>,BlockService
<BlockModel
<object
>>,string
>[]
Returns
BlockElement
<BlockModel
<object
>, BlockService
<BlockModel
<object
>>, string
>[]
Source
packages/blocks/src/page-block/page-service.ts:170
selectedModels
get
selectedModels():BlockModel
<object
>[]
Returns
BlockModel
<object
>[]
Source
packages/blocks/src/page-block/page-service.ts:189
selection
get
selection():EdgelessSelectionManager
Returns
EdgelessSelectionManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:83
selectionManager
get
selectionManager():SelectionManager
Returns
Source
packages/block-std/dist/service/index.d.ts:16
surface
get
surface():SurfaceBlockModel
Returns
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:75
tool
get
tool():EdgelessToolsManager
Returns
EdgelessToolsManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:71
uiEventDispatcher
get
uiEventDispatcher():UIEventDispatcher
Returns
Source
packages/block-std/dist/service/index.d.ts:17
viewport
get
viewport():Viewport
Returns
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:87
viewportElement
get
viewportElement():HTMLElement
Returns
HTMLElement
Source
packages/blocks/src/page-block/page-service.ts:57
workspace
get
workspace():Workspace
Returns
Source
packages/block-std/dist/service/index.d.ts:14
Methods
addBlock()
addBlock(
flavour
,props
,parent
?,parentIndex
?):string
Parameters
• flavour: string
• props: Record
<string
, unknown
>
• parent?: string
| BlockModel
<object
>
• parentIndex?: number
Returns
string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:125
addElement()
addElement<
T
>(type
,props
):string
Type parameters
• T = Record
<string
, unknown
>
Parameters
• type: string
• props: T
Returns
string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:111
bindHotKey()
bindHotKey(
keymap
,options
?):void
Parameters
• keymap: Record
<string
, UIEventHandler
>
• options?: Object
• options.global?: boolean
Returns
void
Inherited from
@blocksuite/blocks.PageService.bindHotKey
Source
packages/block-std/dist/service/index.d.ts:24
createGroup()
createGroup(
elements
):string
Parameters
• elements: string
[] | EdgelessModel
[]
Returns
string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:332
createGroupFromSelected()
createGroupFromSelected():
undefined
|string
Returns
undefined
| string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:352
createTemplateJob()
createTemplateJob(
type
):TemplateJob
Parameters
• type: "template"
| "sticker"
Returns
TemplateJob
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:426
dispose()
dispose():
void
Returns
void
Inherited from
@blocksuite/blocks.PageService.dispose
Source
packages/block-std/dist/service/index.d.ts:18
generateIndex()
generateIndex(
type
):string
Parameters
• type: string
Returns
string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:106
getConnectors()
getConnectors(
element
):ConnectorElementModel
[]
Parameters
• element: string
| EdgelessModel
Returns
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:420
getElementById()
getElementById(
id
):ElementModel
<BaseProps
> |EdgelessBlock
<EdgelessSelectableProps
>
Parameters
• id: string
Returns
ElementModel
<BaseProps
> | EdgelessBlock
<EdgelessSelectableProps
>
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:169
getElementsByType()
getElementsByType<
K
>(type
):ElementModelMap
[K
][]
Type parameters
• K extends keyof ElementModelMap
Parameters
• type: K
Returns
ElementModelMap
[K
][]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:138
getEmbedBlockOptions()
getEmbedBlockOptions(
url
):null
|EmbedOptions
Parameters
• url: string
Returns
null
| EmbedOptions
Inherited from
@blocksuite/blocks.PageService.getEmbedBlockOptions
Source
packages/blocks/src/page-block/page-service.ts:73
handleEvent()
handleEvent(
name
,fn
,options
?):void
Parameters
• name: "click"
| "doubleClick"
| "tripleClick"
| "pointerDown"
| "pointerMove"
| "pointerUp"
| "pointerOut"
| "dragStart"
| "dragMove"
| "dragEnd"
| "keyDown"
| "keyUp"
| "selectionChange"
| "compositionStart"
| "compositionUpdate"
| "compositionEnd"
| "cut"
| "copy"
| "paste"
| "beforeInput"
| "blur"
| "focus"
| "drop"
| "contextMenu"
| "wheel"
• fn: UIEventHandler
• options?: Object
• options.global?: boolean
Returns
void
Inherited from
@blocksuite/blocks.PageService.handleEvent
Source
packages/block-std/dist/service/index.d.ts:21
loadFonts()
loadFonts():
void
Returns
void
Inherited from
@blocksuite/blocks.PageService.loadFonts
Source
packages/blocks/src/page-block/page-service.ts:193
mounted()
mounted():
void
Returns
void
Overrides
@blocksuite/blocks.PageService.mounted
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:45
pickElement()
pickElement(x, y, options)
pickElement(
x
,y
,options
):EdgelessModel
[]
Parameters
• x: number
• y: number
• options: Object
• options.all: true
Returns
EdgelessModel
[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:176
pickElement(x, y, options)
pickElement(
x
,y
,options
?):null
|EdgelessModel
Parameters
• x: number
• y: number
• options?: Object
• options.all?: false
Returns
null
| EdgelessModel
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:177
pickElementInGroup()
pickElementInGroup(
x
,y
,options
?):null
|EdgelessModel
This method is used to pick element in group, if the picked element is in a group, we will pick the group instead. If that picked group is currently selected, then we will pick the element itself.
Parameters
• x: number
• y: number
• options?: HitTestOptions
Returns
null
| EdgelessModel
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:288
pickElementsByBound()
pickElementsByBound(bound, type)
pickElementsByBound(
bound
,type
?):EdgelessModel
[]
Parameters
• bound: Bound
| IBound
• type?: "all"
Returns
EdgelessModel
[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:236
pickElementsByBound(bound, type)
pickElementsByBound(
bound
,type
):EdgelessBlock
<EdgelessSelectableProps
>[]
Parameters
• bound: Bound
| IBound
• type: "blocks"
Returns
EdgelessBlock
<EdgelessSelectableProps
>[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:237
registerEmbedBlockOptions()
registerEmbedBlockOptions(
options
):void
Parameters
• options: EmbedOptions
Returns
void
Inherited from
@blocksuite/blocks.PageService.registerEmbedBlockOptions
Source
packages/blocks/src/page-block/page-service.ts:69
registerTool()
registerTool(
Tool
):void
Parameters
• Tool: EdgelessToolConstructor
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:416
removeElement()
removeElement(
id
):void
Parameters
• id: string
| EdgelessModel
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:157
reorderElement()
reorderElement(
element
,direction
):void
Parameters
• element: EdgelessModel
• direction: ReorderingDirection
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:326
ungroup()
ungroup(
group
):void
Parameters
• group: GroupElementModel
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:386
unmounted()
unmounted():
void
Returns
void
Overrides
@blocksuite/blocks.PageService.unmounted
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:62
updateElement()
updateElement(
id
,props
):void
Parameters
• id: string
• props: Record
<string
, unknown
>
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:144
Generated using TypeDoc and typedoc-plugin-markdown.