Skip to content

CanvasSelection

Unofficial

Manages the visual selection state on the canvas, including selection bounds and resize handles.

Import:

import type { CanvasSelection } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface CanvasSelection

Properties

PropertyTypeDescription
bboxBBoxBounding box encompassing all selected items.
canvasCanvasViewCanvasReference to the parent canvas instance.
resizerElsHTMLDivElement[]Array of resize handle elements around the selection.
selectionElHTMLDivElementElement displaying the selection highlight rectangle.

Methods

MethodReturnsDescription
hide()unknownHide the selection rectangle and handles.
onResizePointerdown(arg1, arg2)unknownHandle pointer down on a resize handle to start resizing the selection.
update(arg1)unknownUpdate the selection rectangle to match the current selected items.

Links to this page: