feat: replace codemirror and image viewr, opt for simplier approach

This commit is contained in:
2026-03-12 23:07:51 +01:00
parent b71d32da5e
commit 4dca9c6478
19 changed files with 464 additions and 709 deletions

View File

@@ -63,9 +63,7 @@ function BorderLoadingIndicator({
container.firstElementChild instanceof HTMLElement
? container.firstElementChild
: container
const cw = (target as HTMLElement).offsetWidth
const ch = (target as HTMLElement).offsetHeight
if (cw > 0 && ch > 0) setMeasured({ w: cw, h: ch })
// Use ResizeObserver only to avoid forced synchronous layout (offsetWidth/offsetHeight).
const unObserve = observeResize(target, ({ width: w, height: h }) => {
if (w > 0 && h > 0) setMeasured({ w, h })
})