fix once
This commit is contained in:
parent
8913c751f0
commit
af2603ef8a
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ export function onScrollTop(el: HTMLElement, cb: Function, asobi: number = 1, on
|
||||||
// とりあえず評価してみる
|
// とりあえず評価してみる
|
||||||
if (isTopVisible(el)) {
|
if (isTopVisible(el)) {
|
||||||
cb();
|
cb();
|
||||||
return null;
|
if (once) return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const container = getScrollContainer(el) || window;
|
const container = getScrollContainer(el) || window;
|
||||||
|
@ -53,7 +53,7 @@ export function onScrollBottom(el: HTMLElement, cb: Function, asobi: number = 1,
|
||||||
// とりあえず評価してみる
|
// とりあえず評価してみる
|
||||||
if (isBottomVisible(el, asobi, container)) {
|
if (isBottomVisible(el, asobi, container)) {
|
||||||
cb();
|
cb();
|
||||||
return null;
|
if (once) return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const containerOrWindow = container || window;
|
const containerOrWindow = container || window;
|
||||||
|
|
Loading…
Reference in a new issue