BlockSuite API Documentation / @blocksuite/blocks / ConnectionOverlay
Class: ConnectionOverlay
An overlay is a layer covered on top of elements, can be used for rendering non-CRDT state indicators.
Extends
Constructors
new ConnectionOverlay()
new ConnectionOverlay(
_gfx
):ConnectionOverlay
Parameters
• _gfx: GfxController
Returns
Overrides
Defined in
packages/affine/block-surface/dist/managers/connector-manager.d.ts:30
Properties
_renderer
protected
_renderer:null
|CanvasRenderer
Inherited from
Defined in
packages/affine/block-surface/dist/renderer/canvas-renderer.d.ts:13
highlightPoint
highlightPoint:
null
|IVec
Defined in
packages/affine/block-surface/dist/managers/connector-manager.d.ts:26
points
points:
IVec
[]
Defined in
packages/affine/block-surface/dist/managers/connector-manager.d.ts:27
sourceBounds
sourceBounds:
null
|IBound
Defined in
packages/affine/block-surface/dist/managers/connector-manager.d.ts:28
targetBounds
targetBounds:
null
|IBound
Defined in
packages/affine/block-surface/dist/managers/connector-manager.d.ts:29
Methods
_clearRect()
_clearRect():
void
Returns
void
Defined in
packages/affine/block-surface/dist/managers/connector-manager.d.ts:32
clear()
clear():
void
Returns
void
Overrides
Defined in
packages/affine/block-surface/dist/managers/connector-manager.d.ts:33
render()
render(
ctx
):void
Parameters
• ctx: CanvasRenderingContext2D
Returns
void
Overrides
Defined in
packages/affine/block-surface/dist/managers/connector-manager.d.ts:34
renderConnector()
renderConnector(
point
,excludedIds
?):Connection
Render the connector at the given point. It will try to find the closest connectable element and render the connector. If the point is not close to any connectable element, it will just render the connector at the given point.
Parameters
• point: IVec
the point to render the connector
• excludedIds?: string
[]
the ids of the elements that should be excluded
Returns
the connection result
Defined in
packages/affine/block-surface/dist/managers/connector-manager.d.ts:44
setRenderer()
setRenderer(
renderer
):void
Parameters
• renderer: null
| CanvasRenderer
Returns
void
Inherited from
Defined in
packages/affine/block-surface/dist/renderer/canvas-renderer.d.ts:17