Konstantinos Kaloutas пре 2 година
родитељ
комит
7ea26ed490
1 измењених фајлова са 9 додато и 0 уклоњено
  1. 9 0
      tldraw/apps/tldraw-logseq/src/lib/shapes/LogseqPortalShape.tsx

+ 9 - 0
tldraw/apps/tldraw-logseq/src/lib/shapes/LogseqPortalShape.tsx

@@ -292,6 +292,15 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
 
     const [loaded, setLoaded] = React.useState(false)
 
+    React.useEffect(() => {
+      if (!this.initialHeightCalculated) {
+        setTimeout(() => {
+          this.onResetBounds()
+          app.persist(true)
+        })
+      }
+    }, [this.initialHeightCalculated])
+
     React.useEffect(() => {
       setTimeout(function () {
         setLoaded(true)