mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 21:03:09 +02:00
✌️
This commit is contained in:
parent
e7251220d5
commit
3bbeac4be2
1 changed files with 7 additions and 1 deletions
|
@ -180,6 +180,7 @@ watch([() => props.pagination.reversed, $$(scrollableElement)], () => {
|
||||||
if (scrollObserver) scrollObserver.disconnect();
|
if (scrollObserver) scrollObserver.disconnect();
|
||||||
|
|
||||||
scrollObserver = new IntersectionObserver(entries => {
|
scrollObserver = new IntersectionObserver(entries => {
|
||||||
|
if (!active.value) return; // activeでない時は触らない
|
||||||
console.log('scrollObserver', entries[0].isIntersecting);
|
console.log('scrollObserver', entries[0].isIntersecting);
|
||||||
weakBacked = entries[0].isIntersecting;
|
weakBacked = entries[0].isIntersecting;
|
||||||
}, {
|
}, {
|
||||||
|
@ -221,6 +222,7 @@ watch([$$(weakBacked), $$(contentEl)], () => {
|
||||||
console.log('weakBacked watcher add scrollRemove', weakBacked, contentEl);
|
console.log('weakBacked watcher add scrollRemove', weakBacked, contentEl);
|
||||||
scrollRemove = (() => {
|
scrollRemove = (() => {
|
||||||
const checkBacked = () => {
|
const checkBacked = () => {
|
||||||
|
if (!active.value) return; // activeでない時は触らない
|
||||||
backed = !checkTop(TOLERANCE);
|
backed = !checkTop(TOLERANCE);
|
||||||
console.log('checkBacked', backed);
|
console.log('checkBacked', backed);
|
||||||
};
|
};
|
||||||
|
@ -487,11 +489,15 @@ function visibilityChange() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onActivated(() => {
|
onActivated(() => {
|
||||||
|
console.log('activated');
|
||||||
active.value = true;
|
active.value = true;
|
||||||
visibilityChange();
|
nextTick(() => {
|
||||||
|
visibilityChange();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
onDeactivated(() => {
|
onDeactivated(() => {
|
||||||
|
console.log('deactivated');
|
||||||
active.value = false;
|
active.value = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue