mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed incorrect active table of contents item when main size changes
This commit is contained in:
parent
6a0e6142e3
commit
7b6ce2a913
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.d8f7c943.min.js.map
Normal file
1
material/assets/javascripts/bundle.d8f7c943.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.0ddca959.min.js",
|
"assets/javascripts/bundle.js": "assets/javascripts/bundle.d8f7c943.min.js",
|
||||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.0ddca959.min.js.map",
|
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.d8f7c943.min.js.map",
|
||||||
"assets/javascripts/vendor.js": "assets/javascripts/vendor.c1fcc1cc.min.js",
|
"assets/javascripts/vendor.js": "assets/javascripts/vendor.c1fcc1cc.min.js",
|
||||||
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.c1fcc1cc.min.js.map",
|
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.c1fcc1cc.min.js.map",
|
||||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.3bc815f0.min.js",
|
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.3bc815f0.min.js",
|
||||||
|
@ -179,7 +179,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/vendor.c1fcc1cc.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/vendor.c1fcc1cc.min.js' | url }}"></script>
|
||||||
<script src="{{ 'assets/javascripts/bundle.0ddca959.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.d8f7c943.min.js' | url }}"></script>
|
||||||
{%- set translations = {} -%}
|
{%- set translations = {} -%}
|
||||||
{%- for key in [
|
{%- for key in [
|
||||||
"clipboard.copy",
|
"clipboard.copy",
|
||||||
|
@ -41,7 +41,7 @@ import {
|
|||||||
tap
|
tap
|
||||||
} from "rxjs/operators"
|
} from "rxjs/operators"
|
||||||
|
|
||||||
import { Viewport, getElement } from "browser"
|
import { Viewport, getElement, watchElementSize } from "browser"
|
||||||
|
|
||||||
import { Header } from "../../../header"
|
import { Header } from "../../../header"
|
||||||
import { AnchorList } from "../_"
|
import { AnchorList } from "../_"
|
||||||
@ -106,9 +106,9 @@ export function watchAnchorList(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/* Compute partition of previous and next anchors */
|
/* Compute partition of previous and next anchors */
|
||||||
const partition$ = viewport$
|
const partition$ = watchElementSize(document.body)
|
||||||
.pipe(
|
.pipe(
|
||||||
distinctUntilKeyChanged("size"),
|
distinctUntilKeyChanged("height"),
|
||||||
|
|
||||||
/* Build index to map anchor paths to vertical offsets */
|
/* Build index to map anchor paths to vertical offsets */
|
||||||
map(() => {
|
map(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user