mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-01 02:08:46 -04:00
Visual formatting
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import ResizeObserver from "resize-observer-polyfill"
|
||||
import { Observable, fromEventPattern } from "rxjs"
|
||||
import { shareReplay, startWith } from "rxjs/operators"
|
||||
|
||||
@@ -70,7 +71,7 @@ export function watchElementSize(
|
||||
width: Math.round(contentRect.width),
|
||||
height: Math.round(contentRect.height)
|
||||
}))
|
||||
.observe(el, { box: "border-box" }) // TODO: centralize, .observe and .unobserve
|
||||
.observe(el)
|
||||
})
|
||||
.pipe(
|
||||
startWith(getElementSize(el)),
|
||||
|
||||
Reference in New Issue
Block a user