Skip to content

BlockSuite API Documentation / @blocksuite/blocks / FrameOverlay

Class: FrameOverlay

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

Extends

Constructors

new FrameOverlay()

new FrameOverlay(gfx): FrameOverlay

Parameters

gfx

GfxController

Returns

FrameOverlay

Overrides

Overlay.constructor

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:52

Properties

_renderer

protected _renderer: null | CanvasRenderer

Inherited from

Overlay._renderer

Defined in

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


gfx

protected gfx: GfxController

Inherited from

Overlay.gfx

Defined in

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


overlayName

static overlayName: string = 'frame'

Overrides

Overlay.overlayName

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:36

Methods

clear()

clear(): void

Returns

void

Overrides

Overlay.clear

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:64


highlight()

highlight(frame, highlightElementsInBound, highlightOutline): void

Parameters

frame

FrameBlockModel

highlightElementsInBound

boolean = false

highlightOutline

boolean = true

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:70


render()

render(ctx): void

Parameters

ctx

CanvasRenderingContext2D

Returns

void

Overrides

Overlay.render

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:113


setRenderer()

setRenderer(renderer): void

Parameters

renderer

null | CanvasRenderer

Returns

void

Inherited from

Overlay.setRenderer

Defined in

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


setup()

static setup(di): void

Parameters

di

Container

Returns

void

Inherited from

Overlay.setup

Defined in

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