Skip to content

BlockSuite API Documentation / @blocksuite/blocks / Overlay

Class: abstract Overlay

An overlay is a layer covered on top of elements, can be used for rendering non-CRDT state indicators.

Extends

Extended by

Constructors

new Overlay()

new Overlay(gfx): Overlay

Parameters

gfx: GfxController

Returns

Overlay

Overrides

Extension.constructor

Defined in

packages/affine/block-surface/dist/renderer/overlay.d.ts:14

Properties

_renderer

protected _renderer: null | CanvasRenderer

Defined in

packages/affine/block-surface/dist/renderer/overlay.d.ts:13


gfx

protected gfx: GfxController

Defined in

packages/affine/block-surface/dist/renderer/overlay.d.ts:11


overlayName

static overlayName: string

Defined in

packages/affine/block-surface/dist/renderer/overlay.d.ts:12

Methods

clear()

clear(): void

Returns

void

Defined in

packages/affine/block-surface/dist/renderer/overlay.d.ts:16


render()

abstract render(ctx, rc): void

Parameters

ctx: CanvasRenderingContext2D

rc: RoughCanvas

Returns

void

Defined in

packages/affine/block-surface/dist/renderer/overlay.d.ts:17


setRenderer()

setRenderer(renderer): void

Parameters

renderer: null | CanvasRenderer

Returns

void

Defined in

packages/affine/block-surface/dist/renderer/overlay.d.ts:18


setup()

static setup(di): void

Parameters

di: Container

Returns

void

Overrides

Extension.setup

Defined in

packages/affine/block-surface/dist/renderer/overlay.d.ts:15