triage cam-pop-op position, constrain widget list, add overflow

This commit is contained in:
Stewart Allen 2026-02-23 23:57:07 -05:00
commit db26bf7f28
2 changed files with 17 additions and 9 deletions

View file

@ -421,9 +421,10 @@ export function opRender() {
const brect = ev.target.getBoundingClientRect();
const prect = parent.getBoundingClientRect();
const Prect = poprec.div.getBoundingClientRect();
const tdiff = prect.top - brect.top;
const botoff = innerHeight - (brect.top + Prect.height);
const offpx = -tdiff + (botoff < 0 ? botoff : -Prect.height/3);
const topmv = brect.top - prect.top - 20;
const topnu = prect.top + topmv;
const botof = innerHeight - (topnu + Prect.height);
const offpx = botof < 0 ? topmv + botof : topmv;
poprec.div.style.transform = `translateY(${offpx}px)`;
poprec.div.onmouseenter = () => { inside = true };
poprec.div.onmouseleave = onLeave;