Skip to content

Commit 2dcd754

Browse files
committed
ocwg/ocif mode now also has support for the mermaid node-type
1 parent 313650a commit 2dcd754

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

apps/vps-web/src/app/pages/ocwg.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { RegisterNodeFactoryFunction } from '@devhelpr/web-flow-executor';
88
// Add Shoelace imports at the top
99
import '@shoelace-style/shoelace/dist/themes/light.css';
1010
import '@shoelace-style/shoelace/dist/components/color-picker/color-picker.js';
11+
import { getMermaidNode, mermaidNodeName } from '../custom-nodes/mermaid';
1112

1213
export function ocwgPage() {
1314
// Add color picker popup
@@ -99,6 +100,13 @@ export function ocwgPage() {
99100
app.theme.backgroundAsHexColor = '#336699';
100101
app.theme.nodeBackground = 'bg-[#113366]';
101102

103+
app.registerExternalNodes = (
104+
registerNodeFactory: RegisterNodeFactoryFunction
105+
) => {
106+
//registerNodeFactory('test-external-node', getExternalTestNode());
107+
registerNodeFactory(mermaidNodeName, getMermaidNode());
108+
};
109+
102110
// Add color picker change handlers
103111
const backgroundPicker = document.getElementById('background-color') as any;
104112
const nodeBackgroundPicker = document.getElementById(
@@ -128,12 +136,6 @@ export function ocwgPage() {
128136
}
129137
});
130138

131-
app.registerExternalNodes = (
132-
_registerNodeFactory: RegisterNodeFactoryFunction
133-
) => {
134-
//
135-
};
136-
137139
// Rest of the existing code...
138140
let currentOcwgExport = '';
139141
ocwgElement

apps/vps-web/src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (url.pathname === '/run-flow') {
2020
import('./app/gl-app.element').then((module) => {
2121
new module.GLAppElement('#app-root');
2222
});
23-
} else if (url.pathname === '/ocwg') {
23+
} else if (url.pathname === '/ocwg' || url.pathname === '/ocif') {
2424
ocwgPage();
2525
} else if (url.pathname === '/python') {
2626
pythonPage();

0 commit comments

Comments
 (0)