Skip to content

BlockSuite API Documentation / @blocksuite/blocks / EdgelessSnapManager

Class: EdgelessSnapManager

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

Extends

Constructors

new EdgelessSnapManager()

new EdgelessSnapManager(gfx): EdgelessSnapManager

Parameters

gfx

GfxController

Returns

EdgelessSnapManager

Overrides

Overlay.constructor

Defined in

packages/blocks/src/root-block/edgeless/utils/snap-manager.ts:63

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 = 'snap-manager'

Overrides

Overlay.overlayName

Defined in

packages/blocks/src/root-block/edgeless/utils/snap-manager.ts:25

Methods

align()

align(bound): object

Parameters

bound

Bound

Returns

object

dx

dx: number

dy

dy: number

Defined in

packages/blocks/src/root-block/edgeless/utils/snap-manager.ts:328


cleanupAlignables()

cleanupAlignables(): void

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/utils/snap-manager.ts:47


clear()

clear(): void

Returns

void

Inherited from

Overlay.clear

Defined in

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


dispose()

dispose(): void

Returns

void

Inherited from

Overlay.dispose

Defined in

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


refresh()

refresh(): void

Returns

void

Inherited from

Overlay.refresh

Defined in

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


render()

render(ctx): void

Parameters

ctx

CanvasRenderingContext2D

Returns

void

Overrides

Overlay.render

Defined in

packages/blocks/src/root-block/edgeless/utils/snap-manager.ts:361


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:20


setupAlignables()

setupAlignables(alignables, exclude): Bound

Parameters

alignables

GfxModel[]

exclude

GfxModel[] = []

Returns

Bound

Defined in

packages/blocks/src/root-block/edgeless/utils/snap-manager.ts:412


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