BlockSuite API Documentation / @blocksuite/affine-block-surface / 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/src/managers/connector-manager.ts:839
Properties
_renderer
protected
_renderer:null
|CanvasRenderer
=null
Inherited from
Defined in
packages/affine/block-surface/src/renderer/overlay.ts:19
gfx
protected
gfx:GfxController
Inherited from
Defined in
packages/affine/block-surface/src/renderer/overlay.ts:21
highlightPoint
highlightPoint:
null
|IVec
=null
Defined in
packages/affine/block-surface/src/managers/connector-manager.ts:831
points
points:
IVec
[] =[]
Defined in
packages/affine/block-surface/src/managers/connector-manager.ts:833
sourceBounds
sourceBounds:
null
|IBound
=null
Defined in
packages/affine/block-surface/src/managers/connector-manager.ts:835
targetBounds
targetBounds:
null
|IBound
=null
Defined in
packages/affine/block-surface/src/managers/connector-manager.ts:837
overlayName
static
overlayName:string
='connection'
Overrides
Defined in
packages/affine/block-surface/src/managers/connector-manager.ts:825
Methods
_clearRect()
_clearRect():
void
Returns
void
Defined in
packages/affine/block-surface/src/managers/connector-manager.ts:865
clear()
clear():
void
Returns
void
Overrides
Defined in
packages/affine/block-surface/src/managers/connector-manager.ts:871
dispose()
dispose():
void
Returns
void
Overrides
Defined in
packages/affine/block-surface/src/managers/connector-manager.ts:877
refresh()
refresh():
void
Returns
void
Inherited from
Defined in
packages/affine/block-surface/src/renderer/overlay.ts:42
render()
render(
ctx
):void
Parameters
ctx
CanvasRenderingContext2D
Returns
void
Overrides
Defined in
packages/affine/block-surface/src/managers/connector-manager.ts:884
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/src/managers/connector-manager.ts:931
setRenderer()
setRenderer(
renderer
):void
Parameters
renderer
null
| CanvasRenderer
Returns
void
Inherited from
Defined in
packages/affine/block-surface/src/renderer/overlay.ts:50
setup()
static
setup(di
):void
Parameters
di
Container
Returns
void
Inherited from
Defined in
packages/affine/block-surface/src/renderer/overlay.ts:25