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

Property Type Description
bbox BBox Bounding box encompassing all selected items.
canvas CanvasViewCanvas Reference to the parent canvas instance.
resizerEls HTMLDivElement[] Array of resize handle elements around the selection.
selectionEl HTMLDivElement Element displaying the selection highlight rectangle.

Methods

Method Returns Description
hide() unknown Hide the selection rectangle and handles.
onResizePointerdown(arg1, arg2) unknown Handle pointer down on a resize handle to start resizing the selection.
update(arg1) unknown Update the selection rectangle to match the current selected items.

Links to this page: