feat: initialize textbox dimensions during viewport sync

This commit is contained in:
me
2026-05-07 16:25:31 +05:30
parent b91d2a4541
commit 61f005fddb
@@ -122,6 +122,7 @@ export function ComposeCanvas({
// re-calculates height based on content and applies the zoom transform
const syncViewport = useCallback(() => {
if (!(fabricRef.current && wrapperRef.current)) return;
textboxRef.current.initDimensions();
const minHeight = initialData?.canvasHeight ?? DEFAULT_LOGICAL_HEIGHT;
logicalSizeRef.current.height = measureLogicalContentHeight(