-
+
+
{hasIO ? (
Playground
) : (
Playground
)}
-
-
-
{ENABLE_API && (
<>
@@ -158,21 +159,18 @@ export default function FlowToolbar(): JSX.Element {
>
API
)}
-
-
-
>
)}
@@ -188,7 +186,7 @@ export default function FlowToolbar(): JSX.Element {
-
+
>
);
}
diff --git a/src/frontend/src/components/shadTooltipComponent/index.tsx b/src/frontend/src/components/shadTooltipComponent/index.tsx
index 387f24e30..2b2fff604 100644
--- a/src/frontend/src/components/shadTooltipComponent/index.tsx
+++ b/src/frontend/src/components/shadTooltipComponent/index.tsx
@@ -10,6 +10,7 @@ export default function ShadTooltip({
styleClasses,
delayDuration = 500,
open,
+ align,
setOpen,
}: ShadToolTipType): JSX.Element {
return content ? (
@@ -21,9 +22,13 @@ export default function ShadTooltip({
>
{children}
{content}
diff --git a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx
index bfbc1f758..1b4eeb548 100644
--- a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx
+++ b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx
@@ -1,8 +1,10 @@
import { DefaultEdge } from "@/CustomEdges";
import NoteNode from "@/CustomNodes/NoteNode";
-import IconComponent from "@/components/genericIconComponent";
+import CanvasControls, {
+ CustomControlButton,
+} from "@/components/canvasControlsComponent";
+import FlowToolbar from "@/components/flowToolbarComponent";
import LoadingComponent from "@/components/loadingComponent";
-import ShadTooltip from "@/components/shadTooltipComponent";
import {
NOTE_NODE_MIN_HEIGHT,
NOTE_NODE_MIN_WIDTH,
@@ -26,13 +28,13 @@ import { useHotkeys } from "react-hotkeys-hook";
import ReactFlow, {
Background,
Connection,
- ControlButton,
- Controls,
Edge,
NodeDragHandler,
OnSelectionChangeParams,
SelectionDragHandler,
updateEdge,
+ useReactFlow,
+ useViewport,
} from "reactflow";
import GenericNode from "../../../../CustomNodes/GenericNode";
import {
@@ -117,6 +119,9 @@ export default function Page({ view }: { view?: boolean }): JSX.Element {
const [isAddingNote, setIsAddingNote] = useState(false);
const [isHighlightingCursor, setIsHighlightingCursor] = useState(false);
+ const { zoomIn, zoomOut, fitView } = useReactFlow();
+ const { zoom } = useViewport();
+
useEffect(() => {
const handleVisibilityChange = () => {
if (!document.hidden) {
@@ -617,25 +622,20 @@ export default function Page({ view }: { view?: boolean }): JSX.Element {
>
{!view && (
-
- {
- setIsAddingNote(true);
- }}
- className="postion react-flow__controls absolute -top-10"
- >
-
-
-
-
-
-
-
+ <>
+
+ {
+ setIsAddingNote(true);
+ }}
+ iconClasses="text-primary"
+ testId="add_note"
+ />
+
+
+ >
)}