Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

feat(16-1): Add canvas controls, background, and minimap

Juan Denis68169b01ab02
diff --git a/frontend/src/pages/WorkflowBuilder.jsx b/frontend/src/pages/WorkflowBuilder.jsx
index 72c07ffb..98abdb48 100644
--- a/frontend/src/pages/WorkflowBuilder.jsx
+++ b/frontend/src/pages/WorkflowBuilder.jsx
@@ -4,7 +4,10 @@ import {
ReactFlowProvider,
useNodesState,
useEdgesState,
- addEdge
+ addEdge,
+ Background,
+ Controls,
+ MiniMap
} from '@xyflow/react';
import '@xyflow/react/dist/style.css';
@@ -29,7 +32,30 @@ const WorkflowCanvas = () => {
onEdgesChange={onEdgesChange}
onConnect={onConnect}
fitView
- />
+ panOnScroll
+ selectionOnDrag
+ panOnDrag={[1, 2]}
+ selectNodesOnDrag={false}
+ >
+ <Background
+ variant="dots"
+ gap={20}
+ size={1}
+ color="#333"
+ />
+ <Controls
+ showZoom={true}
+ showFitView={true}
+ showInteractive={false}
+ />
+ <MiniMap
+ nodeColor="#6366f1"
+ maskColor="rgba(0, 0, 0, 0.8)"
+ style={{
+ backgroundColor: '#1a1a1e'
+ }}
+ />
+ </ReactFlow>
</div>
);
};