fix: logseq portal resizing issue

This commit is contained in:
Peng Xiao
2022-09-06 23:40:13 +08:00
parent fb69e99a82
commit 32e534d712

View File

@@ -19,12 +19,10 @@ export const HTMLLayer = observer(function HTMLLayer({ children }: HTMLLayerProp
if (!layer) return
const { zoom, point } = viewport.camera
requestAnimationFrame(() => {
layer.style.setProperty(
'transform',
`scale(${zoom}) translate3d(${point[0]}px, ${point[1]}px, 0)`
)
})
layer.style.setProperty(
'transform',
`scale(${zoom}) translate3d(${point[0]}px, ${point[1]}px, 0)`
)
}),
[]
)