clampMenuPosition
Documentation / @elitechart/core / clampMenuPosition
Defined in: ui/drawing-context-menu.ts:100
Clamp pos so the menu (mw×mh) stays inside the container (cw×ch).
Prefers the requested position; nudges it left/up if it would overflow
the right/bottom edge.
Parameters
pos
mw
number
mh
number
cw
number
ch
number
padding?
number = 4