mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-31 09:48:53 -04:00
Removed unnecessary deferrals to animation frames
This commit is contained in:
@@ -23,13 +23,11 @@
|
||||
import {
|
||||
Observable,
|
||||
Subject,
|
||||
animationFrameScheduler,
|
||||
bufferCount,
|
||||
filter,
|
||||
finalize,
|
||||
map,
|
||||
merge,
|
||||
observeOn,
|
||||
of,
|
||||
skipUntil,
|
||||
switchMap,
|
||||
@@ -106,7 +104,6 @@ export function mountSearchResult(
|
||||
/* Update search result metadata */
|
||||
push$
|
||||
.pipe(
|
||||
observeOn(animationFrameScheduler),
|
||||
withLatestFrom(query$),
|
||||
skipUntil(ready$)
|
||||
)
|
||||
@@ -139,7 +136,6 @@ export function mountSearchResult(
|
||||
/* Update search result list */
|
||||
push$
|
||||
.pipe(
|
||||
observeOn(animationFrameScheduler),
|
||||
tap(() => list.innerHTML = ""),
|
||||
switchMap(({ items }) => merge(
|
||||
of(...items.slice(0, 10)),
|
||||
|
||||
@@ -22,11 +22,9 @@
|
||||
|
||||
import {
|
||||
Observable,
|
||||
animationFrameScheduler,
|
||||
combineLatest,
|
||||
delay,
|
||||
map,
|
||||
observeOn,
|
||||
of,
|
||||
switchMap,
|
||||
withLatestFrom
|
||||
@@ -71,8 +69,7 @@ export function patchScrolllock(
|
||||
map(([active, tablet]) => active && !tablet),
|
||||
switchMap(active => of(active)
|
||||
.pipe(
|
||||
delay(active ? 400 : 100),
|
||||
observeOn(animationFrameScheduler)
|
||||
delay(active ? 400 : 100)
|
||||
)
|
||||
),
|
||||
withLatestFrom(viewport$)
|
||||
|
||||
Reference in New Issue
Block a user