Try fix nav arrangement.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7c2e829df7
commit
a26a2df198
8
index.js
8
index.js
@ -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]);}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user