Try fix nav arrangement.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Captain ALM 2022-08-17 18:35:43 +01:00
parent 7c2e829df7
commit a26a2df198
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1

View File

@ -305,14 +305,15 @@ function PerformNavResize() {
var mensz = 0 var mensz = 0
var menc = [] var menc = []
var imenc = 0 var imenc = 0
for (vmeni = 0; vmeni < vmen.childNodes.length; vmeni++) { for (vmeni = vmen.childNodes.length - 1; vmeni >= 0; vmeni--) {
if (vmen.childNodes[vmeni].nodeType === Node.ELEMENT_NODE) { if (vmen.childNodes[vmeni].nodeType === Node.ELEMENT_NODE) {
if (mensz+vmen.childNodes[vmeni].clientWidth > maxbarsz) {menc[imenc] = vmen.childNodes[vmeni]; imenc++;} if (mensz+vmen.childNodes[vmeni].clientWidth > maxbarsz) {menc[imenc] = vmen.childNodes[vmeni]; imenc++;}
mensz += vmen.childNodes[vmeni].clientWidth mensz += vmen.childNodes[vmeni].clientWidth
} }
} }
if (menc.length > 0) { if (menc.length > 0) {
for (vmeni = 0; vmeni < menc.length; vmeni++) {men.appendChild(men.removeChild(menc[vmeni]));} for (vmeni = 0; vmeni < menc.length; vmeni++) {vmen.removeChild(menc[vmeni]);}
for (vmeni = menc.length - 1; vmeni >= 0; vmeni--) {InsertBefore(men, menc[vmeni]);}
} else { } else {
for (vmeni = 0; vmeni < men.childNodes.length; vmeni++) { for (vmeni = 0; vmeni < men.childNodes.length; vmeni++) {
if (men.childNodes[vmeni].nodeType === Node.ELEMENT_NODE) { if (men.childNodes[vmeni].nodeType === Node.ELEMENT_NODE) {
@ -322,8 +323,7 @@ function PerformNavResize() {
mensz += menaw mensz += menaw
} }
} }
for (vmeni = 0; vmeni < menc.length; vmeni++) {men.removeChild(menc[vmeni]);} for (vmeni = 0; vmeni < menc.length; vmeni++) {vmen.appendChild(men.removeChild(menc[vmeni]));}
for (vmeni = menc.length - 1; vmeni >= 0; vmeni--) {InsertBefore(vmen, menc[vmeni]);}
} }
} }
} }