mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
rebuilding site Thu Sep 24 09:59:25 AM CST 2020
This commit is contained in:
parent
954aad99dd
commit
7503bf0dae
1 changed files with 8 additions and 6 deletions
|
@ -38,16 +38,18 @@ function is_same_size_position(ele1, ele2) {
|
|||
}
|
||||
}
|
||||
|
||||
function find_top_wrap_ele(ele) {
|
||||
function find_top_wrap_ele(ele) {
|
||||
let origE = ele;
|
||||
let wrap = ele;
|
||||
while (ele.tagName !== 'BODY') {
|
||||
ele = ele.parentElement;
|
||||
if (is_same_size_position(wrap, ele)) {
|
||||
wrap = ele;
|
||||
}
|
||||
ele = ele.parentElement;
|
||||
if (is_same_size_position(wrap, ele)) {
|
||||
wrap = ele;
|
||||
}
|
||||
}
|
||||
if(wrap == origE) wrap = origE.parentElement;
|
||||
return wrap;
|
||||
}
|
||||
}
|
||||
|
||||
function is_parent(ele, parent) {
|
||||
while (ele.tagName !== 'BODY' &&
|
||||
|
|
Loading…
Reference in a new issue