mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Removed unnecessary deferrals to animation frames
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -213,7 +213,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.7d4612cf.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.cb647d62.min.js' | url }}"></script>
|
||||||
{% for path in config["extra_javascript"] %}
|
{% for path in config["extra_javascript"] %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -16,5 +16,5 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script src="{{ 'overrides/assets/javascripts/bundle.fa323f41.min.js' | url }}"></script>
|
<script src="{{ 'overrides/assets/javascripts/bundle.876eeeea.min.js' | url }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -23,13 +23,11 @@
|
|||||||
import {
|
import {
|
||||||
Observable,
|
Observable,
|
||||||
Subject,
|
Subject,
|
||||||
animationFrameScheduler,
|
|
||||||
bufferCount,
|
bufferCount,
|
||||||
filter,
|
filter,
|
||||||
finalize,
|
finalize,
|
||||||
map,
|
map,
|
||||||
merge,
|
merge,
|
||||||
observeOn,
|
|
||||||
of,
|
of,
|
||||||
skipUntil,
|
skipUntil,
|
||||||
switchMap,
|
switchMap,
|
||||||
@@ -106,7 +104,6 @@ export function mountSearchResult(
|
|||||||
/* Update search result metadata */
|
/* Update search result metadata */
|
||||||
push$
|
push$
|
||||||
.pipe(
|
.pipe(
|
||||||
observeOn(animationFrameScheduler),
|
|
||||||
withLatestFrom(query$),
|
withLatestFrom(query$),
|
||||||
skipUntil(ready$)
|
skipUntil(ready$)
|
||||||
)
|
)
|
||||||
@@ -139,7 +136,6 @@ export function mountSearchResult(
|
|||||||
/* Update search result list */
|
/* Update search result list */
|
||||||
push$
|
push$
|
||||||
.pipe(
|
.pipe(
|
||||||
observeOn(animationFrameScheduler),
|
|
||||||
tap(() => list.innerHTML = ""),
|
tap(() => list.innerHTML = ""),
|
||||||
switchMap(({ items }) => merge(
|
switchMap(({ items }) => merge(
|
||||||
of(...items.slice(0, 10)),
|
of(...items.slice(0, 10)),
|
||||||
|
|||||||
@@ -22,11 +22,9 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
Observable,
|
Observable,
|
||||||
animationFrameScheduler,
|
|
||||||
combineLatest,
|
combineLatest,
|
||||||
delay,
|
delay,
|
||||||
map,
|
map,
|
||||||
observeOn,
|
|
||||||
of,
|
of,
|
||||||
switchMap,
|
switchMap,
|
||||||
withLatestFrom
|
withLatestFrom
|
||||||
@@ -71,8 +69,7 @@ export function patchScrolllock(
|
|||||||
map(([active, tablet]) => active && !tablet),
|
map(([active, tablet]) => active && !tablet),
|
||||||
switchMap(active => of(active)
|
switchMap(active => of(active)
|
||||||
.pipe(
|
.pipe(
|
||||||
delay(active ? 400 : 100),
|
delay(active ? 400 : 100)
|
||||||
observeOn(animationFrameScheduler)
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
withLatestFrom(viewport$)
|
withLatestFrom(viewport$)
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import { filter as search } from "fuzzaldrin-plus"
|
|||||||
import {
|
import {
|
||||||
Observable,
|
Observable,
|
||||||
Subject,
|
Subject,
|
||||||
animationFrameScheduler,
|
|
||||||
bufferCount,
|
bufferCount,
|
||||||
combineLatest,
|
combineLatest,
|
||||||
distinctUntilKeyChanged,
|
distinctUntilKeyChanged,
|
||||||
@@ -32,7 +31,6 @@ import {
|
|||||||
finalize,
|
finalize,
|
||||||
map,
|
map,
|
||||||
merge,
|
merge,
|
||||||
observeOn,
|
|
||||||
of,
|
of,
|
||||||
switchMap,
|
switchMap,
|
||||||
tap,
|
tap,
|
||||||
@@ -152,7 +150,6 @@ export function mountIconSearchResult(
|
|||||||
const meta = getElement(":scope > :first-child", el)
|
const meta = getElement(":scope > :first-child", el)
|
||||||
push$
|
push$
|
||||||
.pipe(
|
.pipe(
|
||||||
observeOn(animationFrameScheduler),
|
|
||||||
withLatestFrom(query$)
|
withLatestFrom(query$)
|
||||||
)
|
)
|
||||||
.subscribe(([{ data }, { value }]) => {
|
.subscribe(([{ data }, { value }]) => {
|
||||||
@@ -185,7 +182,6 @@ export function mountIconSearchResult(
|
|||||||
const list = getElement(":scope > :last-child", el)
|
const list = getElement(":scope > :last-child", el)
|
||||||
push$
|
push$
|
||||||
.pipe(
|
.pipe(
|
||||||
observeOn(animationFrameScheduler),
|
|
||||||
tap(() => list.innerHTML = ""),
|
tap(() => list.innerHTML = ""),
|
||||||
switchMap(({ data }) => merge(
|
switchMap(({ data }) => merge(
|
||||||
of(...data.slice(0, 10)),
|
of(...data.slice(0, 10)),
|
||||||
|
|||||||
Reference in New Issue
Block a user