translateMouseEvent
translateMouseEvent(
ev,type,metrics,bounds?):MouseEvent
Defined in: src/driver/web/dom.ts:95
Map a DOM mouse event (pixel coordinates relative to the host element) to a
ztui MouseEvent in cell units. bounds, when given (the driver’s
current column/row count), clamps the result to a valid cell — a host
element with padding/border wider than an exact multiple of the cell size
would otherwise report coordinates past the last visible column/row that
widgets don’t expect.
Parameters
Section titled “Parameters”button?
Section titled “button?”number
buttons?
Section titled “buttons?”number
offsetX
Section titled “offsetX”number
offsetY
Section titled “offsetY”number
"press" | "release" | "drag" | "move" | "scroll_up" | "scroll_down"
metrics
Section titled “metrics”bounds?
Section titled “bounds?”number
number