Skip to content

Commit

Permalink
chore(Canvas): Split CanvasService in ControllerService and `Flow…
Browse files Browse the repository at this point in the history
…Service`

Split `CanvasService` for better separation of concerns.

fix: KaotoIO#1329
  • Loading branch information
lordrip committed Aug 19, 2024
1 parent a72d5f2 commit 72f8b25
Show file tree
Hide file tree
Showing 4 changed files with 709 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ui/src/components/Visualization/Canvas/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { CanvasSideBar } from './CanvasSideBar';
import { CanvasDefaults } from './canvas.defaults';
import { CanvasEdge, CanvasNode, LayoutType } from './canvas.models';
import { CanvasService } from './canvas.service';
import { FlowService } from './flow.service';

interface CanvasProps {
contextToolbar?: ReactNode;
Expand Down Expand Up @@ -162,7 +163,7 @@ export const Canvas: FunctionComponent<PropsWithChildren<CanvasProps>> = ({ enti

entities.forEach((entity) => {
if (visibleFlows[entity.id]) {
const { nodes: childNodes, edges: childEdges } = CanvasService.getFlowDiagram(entity.toVizNode());
const { nodes: childNodes, edges: childEdges } = FlowService.getFlowDiagram(entity.toVizNode());
nodes.push(...childNodes);
edges.push(...childEdges);
}
Expand Down
Loading

0 comments on commit 72f8b25

Please sign in to comment.