diff --git a/src/components/GroupsOverlay.tsx b/src/components/GroupsOverlay.tsx index 6c2a0a1b..5f55d296 100644 --- a/src/components/GroupsOverlay.tsx +++ b/src/components/GroupsOverlay.tsx @@ -1,7 +1,7 @@ "use client"; import { useCallback, useState, useRef, useEffect } from "react"; -import { useViewport, ViewportPortal } from "@xyflow/react"; +import { useStore, ViewportPortal } from "@xyflow/react"; import { useWorkflowStore, GROUP_COLORS } from "@/store/workflowStore"; import { GroupColor } from "@/types"; @@ -492,7 +492,7 @@ export function GroupBackgroundsPortal() { // Renders group controls (headers, resize handles) using ViewportPortal above nodes export function GroupControlsOverlay() { const { groups } = useWorkflowStore(); - const { zoom } = useViewport(); + const zoom = useStore((s) => s.transform[2]); const groupIds = Object.keys(groups);