statistica vibe 5
This commit is contained in:
parent
bcd1c40783
commit
ae4698718e
2 changed files with 48 additions and 4 deletions
|
|
@ -843,6 +843,20 @@ body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);min-h
|
|||
position: fixed; /* fixed so it escapes any overflow:hidden parent */
|
||||
z-index: 500;
|
||||
}
|
||||
/* Невидимая зона между бейджем и списком — курсор не выходит из «цепочки» hover */
|
||||
.inline-status-picker .isp-dropdown::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: -10px;
|
||||
height: 10px;
|
||||
}
|
||||
.inline-status-picker .isp-dropdown.isp-drop-up::before {
|
||||
top: auto;
|
||||
bottom: -10px;
|
||||
height: 10px;
|
||||
}
|
||||
.inline-status-picker:hover .isp-dropdown,
|
||||
.inline-status-picker.isp-open .isp-dropdown {
|
||||
display: block;
|
||||
|
|
|
|||
|
|
@ -562,15 +562,45 @@ function statusPickerHtml(tid){
|
|||
}
|
||||
function ispShow(el){
|
||||
const dd=el.querySelector('.isp-dropdown');
|
||||
if(!dd) return;
|
||||
const inner=dd?.querySelector('.isp-dropdown-inner');
|
||||
if(!dd||!inner) return;
|
||||
/** Список чуть заходит на бейдж — без «дыры», курсор не теряет hover */
|
||||
const OVERLAP=4;
|
||||
const edge=6;
|
||||
const r=el.getBoundingClientRect();
|
||||
dd.style.top=(r.bottom)+'px';
|
||||
dd.style.left=r.left+'px';
|
||||
inner.style.maxHeight='';
|
||||
inner.style.overflowY='';
|
||||
dd.classList.remove('isp-drop-up');
|
||||
dd.style.display='block';
|
||||
dd.style.left=r.left+'px';
|
||||
dd.style.top=(r.bottom-OVERLAP)+'px';
|
||||
let h=dd.getBoundingClientRect().height;
|
||||
const spaceBelow=window.innerHeight-r.bottom+OVERLAP;
|
||||
const spaceAbove=r.top+OVERLAP;
|
||||
const flipUp=h>spaceBelow&&spaceAbove>=spaceBelow;
|
||||
if(flipUp){
|
||||
let top=r.top-h+OVERLAP;
|
||||
if(top<edge){
|
||||
inner.style.maxHeight=Math.max(80,spaceAbove-edge)+'px';
|
||||
inner.style.overflowY='auto';
|
||||
h=dd.getBoundingClientRect().height;
|
||||
top=r.top-h+OVERLAP;
|
||||
}
|
||||
dd.style.top=Math.max(edge,top)+'px';
|
||||
dd.classList.add('isp-drop-up');
|
||||
}else if(h>spaceBelow){
|
||||
inner.style.maxHeight=Math.max(80,spaceBelow-edge)+'px';
|
||||
inner.style.overflowY='auto';
|
||||
dd.style.top=(r.bottom-OVERLAP)+'px';
|
||||
}
|
||||
}
|
||||
function ispHide(el){
|
||||
const dd=el.querySelector('.isp-dropdown');
|
||||
if(dd) dd.style.display='none';
|
||||
if(!dd) return;
|
||||
dd.style.display='none';
|
||||
dd.classList.remove('isp-drop-up');
|
||||
const inner=dd.querySelector('.isp-dropdown-inner');
|
||||
if(inner){ inner.style.maxHeight=''; inner.style.overflowY=''; }
|
||||
}
|
||||
|
||||
// ── Column picker ─────────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue