DragMouseParams
Parameters for Lib.dragMouse.
Import:
import type { DragMouseParams } from 'obsidian-integration-testing';Signature:
export interface DragMouseParamsProperties
| Property | Type | Description |
|---|---|---|
| button? | MouseButton | The mouse button to hold for the whole drag. |
| from | MousePoint | The point (web-contents DIP) where the button goes down. |
| modifiers? | readonly Modifier[] | The modifier keys to hold for the whole drag, using Obsidian's Modifier names. 'Mod' resolves per-platform (Cmd on macOS, Ctrl elsewhere). |
| steps? | number | How many held-button moves to send between DragMouseParams.from and DragMouseParams.to, evenly spaced along the straight line, the last one landing on to. More steps make a slower, smoother drag; a handler that tracks the pointer's path (a canvas edge, a drag threshold) needs more than one. |
| to | MousePoint | The point (web-contents DIP) where the button is released. |
| window? | Window | The Obsidian window to drag in: the main window or a popout. Both points are in the named window's viewport. |
Links to this page: