feat: replace codemirror and image viewr, opt for simplier approach
This commit is contained in:
@@ -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 })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user