mirror of
https://github.com/9001/copyparty.git
synced 2025-08-20 02:12:20 -06:00
positioning + optimization
This commit is contained in:
parent
64304a9d65
commit
970badce66
|
@ -673,13 +673,13 @@ input.eq_gain {
|
||||||
border-bottom: 1px solid #111;
|
border-bottom: 1px solid #111;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
#tree #treepar {
|
#treepar {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
margin-top: -3px;
|
left: -.75em;
|
||||||
margin-left: -2em;
|
width: calc(var(--nav-sz) - 0.5em);
|
||||||
width: calc(var(--nav-sz) + 0.5em);
|
|
||||||
border-bottom: 1px solid #444;
|
border-bottom: 1px solid #444;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
#tree, #treeh {
|
#tree, #treeh {
|
||||||
border-radius: 0 .3em 0 0;
|
border-radius: 0 .3em 0 0;
|
||||||
|
|
|
@ -3397,11 +3397,20 @@ var treectl = (function () {
|
||||||
|
|
||||||
var tree = ebi('tree'),
|
var tree = ebi('tree'),
|
||||||
wrap = ebi('wrap'),
|
wrap = ebi('wrap'),
|
||||||
|
wraptop = null,
|
||||||
atop = wrap.getBoundingClientRect().top,
|
atop = wrap.getBoundingClientRect().top,
|
||||||
winh = window.innerHeight,
|
winh = window.innerHeight,
|
||||||
parp = ebi('treepar'),
|
parp = ebi('treepar'),
|
||||||
y = tree.scrollTop;
|
y = tree.scrollTop,
|
||||||
|
w = tree.offsetWidth;
|
||||||
|
|
||||||
|
if (atop !== prev_atop || winh !== prev_winh)
|
||||||
|
wraptop = Math.floor(wrap.offsetTop);
|
||||||
|
|
||||||
|
if (r.parpane && r.pdir.length && w != r.pdirw) {
|
||||||
|
r.pdirw = w;
|
||||||
|
compy();
|
||||||
|
}
|
||||||
|
|
||||||
if (!r.parpane || !r.pdir.length || y > r.pdir.slice(-1)[0][0] || y < r.pdir[0][0]) {
|
if (!r.parpane || !r.pdir.length || y > r.pdir.slice(-1)[0][0] || y < r.pdir[0][0]) {
|
||||||
parp.style.display = 'none';
|
parp.style.display = 'none';
|
||||||
|
@ -3427,9 +3436,16 @@ var treectl = (function () {
|
||||||
for (var a = 0, aa = els.length; a < aa; a++)
|
for (var a = 0, aa = els.length; a < aa; a++)
|
||||||
els[a].onclick = bad_proxy;
|
els[a].onclick = bad_proxy;
|
||||||
}
|
}
|
||||||
|
y = ebi('treeh').offsetHeight;
|
||||||
|
if (!fixedpos)
|
||||||
|
y += tree.offsetTop - document.documentElement.scrollTop;
|
||||||
|
|
||||||
|
y = (y - 3) + 'px';
|
||||||
|
if (parp.style.top != y)
|
||||||
|
parp.style.top = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atop === prev_atop && winh === prev_winh)
|
if (wraptop === null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
prev_atop = atop;
|
prev_atop = atop;
|
||||||
|
@ -3450,7 +3466,7 @@ var treectl = (function () {
|
||||||
tree.style.top = Math.max(0, parseInt(atop)) + 'px';
|
tree.style.top = Math.max(0, parseInt(atop)) + 'px';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var top = Math.max(0, parseInt(wrap.offsetTop)),
|
var top = Math.max(0, wraptop),
|
||||||
treeh = winh - atop;
|
treeh = winh - atop;
|
||||||
|
|
||||||
tree.style.top = top + 'px';
|
tree.style.top = top + 'px';
|
||||||
|
|
Loading…
Reference in a new issue