mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed emission of active layer element
This commit is contained in:
parent
ec9ad27251
commit
de73cac7b8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
material/assets/javascripts/bundle.eed5646e.min.js.map
Normal file
1
material/assets/javascripts/bundle.eed5646e.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.9326ea86.min.js",
|
"assets/javascripts/bundle.js": "assets/javascripts/bundle.eed5646e.min.js",
|
||||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.9326ea86.min.js.map",
|
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.eed5646e.min.js.map",
|
||||||
"assets/javascripts/worker/packer.js": "assets/javascripts/worker/packer.819c2a16.min.js",
|
"assets/javascripts/worker/packer.js": "assets/javascripts/worker/packer.819c2a16.min.js",
|
||||||
"assets/javascripts/worker/packer.js.map": "assets/javascripts/worker/packer.819c2a16.min.js.map",
|
"assets/javascripts/worker/packer.js.map": "assets/javascripts/worker/packer.819c2a16.min.js.map",
|
||||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.57bba61e.min.js",
|
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.57bba61e.min.js",
|
||||||
|
@ -188,7 +188,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.9326ea86.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.eed5646e.min.js' | url }}"></script>
|
||||||
<script id="__lang" type="application/json">
|
<script id="__lang" type="application/json">
|
||||||
{%- set translations = {} -%}
|
{%- set translations = {} -%}
|
||||||
{%- for key in [
|
{%- for key in [
|
||||||
|
@ -30,10 +30,10 @@ import {
|
|||||||
pipe
|
pipe
|
||||||
} from "rxjs"
|
} from "rxjs"
|
||||||
import {
|
import {
|
||||||
bufferCount,
|
|
||||||
delay,
|
delay,
|
||||||
map,
|
map,
|
||||||
observeOn,
|
observeOn,
|
||||||
|
scan,
|
||||||
shareReplay,
|
shareReplay,
|
||||||
tap
|
tap
|
||||||
} from "rxjs/operators"
|
} from "rxjs/operators"
|
||||||
@ -52,8 +52,8 @@ import { getElement, getElements } from "utilities"
|
|||||||
* Active layer
|
* Active layer
|
||||||
*/
|
*/
|
||||||
export interface ActiveLayer {
|
export interface ActiveLayer {
|
||||||
prev?: HTMLElement /* Anchors (previous) */
|
prev?: HTMLElement /* Layer (previous) */
|
||||||
next: HTMLElement /* Anchors (next) */
|
next: HTMLElement /* Layer (next) */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------------
|
/* ----------------------------------------------------------------------------
|
||||||
@ -97,9 +97,8 @@ export function watchActiveLayer(
|
|||||||
/* Return previous and next layer */
|
/* Return previous and next layer */
|
||||||
return active$
|
return active$
|
||||||
.pipe(
|
.pipe(
|
||||||
// TODO: this doesnt emit correctly
|
map(next => ({ next })),
|
||||||
bufferCount(2, 1),
|
scan(({ next: prev }, { next }) => ({ prev, next })),
|
||||||
map(([prev, next]) => ({ prev, next })),
|
|
||||||
shareReplay(1)
|
shareReplay(1)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user