misc: tweak measuring
This commit is contained in:
1 parent
86f4bec26d
commit
d936f8f035
2 files changed
+4
-1
No files matched your search
@@ -8,8 +8,9 @@
|
|||||||
import { expoOut } from 'svelte/easing'
|
import { expoOut } from 'svelte/easing'
|
||||||
import { fly, slide } from 'svelte/transition'
|
import { fly, slide } from 'svelte/transition'
|
||||||
import { browser } from '$app/environment'
|
import { browser } from '$app/environment'
|
||||||
import { afterUpdate, type SvelteComponent } from 'svelte'
|
import { afterUpdate, onMount, tick, type SvelteComponent } from 'svelte'
|
||||||
import { createWindowVirtualizer } from '@tanstack/svelte-virtual'
|
import { createWindowVirtualizer } from '@tanstack/svelte-virtual'
|
||||||
|
import { afterNavigate, beforeNavigate } from '$app/navigation'
|
||||||
|
|
||||||
type PostViewWithCrossposts = PostView & {
|
type PostViewWithCrossposts = PostView & {
|
||||||
withCrossposts: true
|
withCrossposts: true
|
||||||
|
|||||||
@@ -40,9 +40,11 @@
|
|||||||
if (browser) {
|
if (browser) {
|
||||||
if ($navigating) {
|
if ($navigating) {
|
||||||
nProgress.start()
|
nProgress.start()
|
||||||
|
console.log(`saving scroll at ${window.scrollY}`)
|
||||||
}
|
}
|
||||||
if (!$navigating) {
|
if (!$navigating) {
|
||||||
nProgress.done()
|
nProgress.done()
|
||||||
|
console.log(`scrolling to ${window.scrollY}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user