Fixed header title component

This commit is contained in:
squidfunk
2020-09-27 18:07:48 +02:00
parent 7820d85949
commit ee808c769e
10 changed files with 16 additions and 16 deletions

View File

@@ -36,7 +36,7 @@ import { getActiveElement } from "../_"
* @param value - Whether the element should be focused
*/
export function setElementFocus(
el: HTMLElement, value: boolean = true
el: HTMLElement, value: boolean = true
): void {
if (value)
el.focus()

View File

@@ -27,7 +27,7 @@ import {
map,
startWith,
switchMap,
withLatestFrom
zipWith
} from "rxjs/operators"
import {
@@ -99,7 +99,7 @@ export function mountHeader(
.pipe(
map(main => getElement("h1, h2, h3, h4, h5, h6", main)!),
filter(hx => typeof hx !== "undefined"),
withLatestFrom(useComponent("header-title")),
zipWith(useComponent("header-title")),
switchMap(([hx, title]) => watchViewportAt(hx, { header$, viewport$ })
.pipe(
map(({ offset: { y } }) => {