feat: change detection line
This commit is contained in:
parent
664284ce95
commit
e9db12c3cb
1 changed files with 1 additions and 4 deletions
|
|
@ -52,10 +52,7 @@ function onScroll() {
|
||||||
const containerRect = container.getBoundingClientRect();
|
const containerRect = container.getBoundingClientRect();
|
||||||
const elementRect = v.element.getBoundingClientRect();
|
const elementRect = v.element.getBoundingClientRect();
|
||||||
|
|
||||||
if (
|
if (containerRect.y + containerRect.height / 5 >= elementRect.y) {
|
||||||
containerRect.y + containerRect.height / 3 >=
|
|
||||||
elementRect.y + elementRect.height / 2
|
|
||||||
) {
|
|
||||||
current = v.anchor;
|
current = v.anchor;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue