Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Background,
useNodesState,
useEdgesState,
addEdge,

Check failure on line 9 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.10)

'addEdge' is defined but never used. Allowed unused vars must match /^[A-Z_]/u

Check failure on line 9 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.11)

'addEdge' is defined but never used. Allowed unused vars must match /^[A-Z_]/u
} from '@xyflow/react';
import '@xyflow/react/dist/style.css';
import './App.css';
Expand All @@ -29,6 +29,7 @@
import { makeEdge } from './CustomEdge';
import MultiplierNode from './MultiplierNode';
import { Splitter2Node, Splitter3Node } from './Splitters';
import VialNode from './VialNode';
import BubblerNode from './BubblerNode';
import WallNode from './WallNode';

Expand All @@ -53,11 +54,11 @@
pid: DefaultNode,
splitter2: Splitter2Node,
splitter3: Splitter3Node,
vial: VialNode,
wall: WallNode,
bubbler: BubblerNode,
white_noise: SourceNode,
pink_noise: SourceNode,

};

// Defining initial nodes and edges. In the data section, we have label, but also parameters specific to the node.
Expand Down Expand Up @@ -805,7 +806,7 @@
return () => {
document.removeEventListener('keydown', handleKeyDown);
};
}, [selectedEdge, selectedNode, copiedNode, duplicateNode, setCopyFeedback]);

Check warning on line 809 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.10)

React Hook useEffect has missing dependencies: 'deleteSelectedEdge' and 'deleteSelectedNode'. Either include them or remove the dependency array

Check warning on line 809 in src/App.jsx

View workflow job for this annotation

GitHub Actions / test (20.x, 3.11)

React Hook useEffect has missing dependencies: 'deleteSelectedEdge' and 'deleteSelectedNode'. Either include them or remove the dependency array

return (
<div style={{ width: '100vw', height: '100vh', position: 'relative' }}>
Expand Down
32 changes: 32 additions & 0 deletions src/VialNode.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import { Handle } from '@xyflow/react';
import vialIcon from './vial-svgrepo-com.svg';


export default function VialNode({ data }) {
return (
<div style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center'
}}>
<img src={vialIcon} alt="Vial" width="100 px" style={{
// filter: 'hue-rotate(180deg)', // Change color
// // or
filter: 'invert(1)', // Invert colors
}}/>
<div style={{
fontSize: '12px',
textAlign: 'center',
marginBottom: '8px',
color: 'white',
fontWeight: 'bold',
}}>
{data.label}<br></br>Not implemented yet
</div>

<Handle type="target" position="top" style={{ background: '#555' }} />
<Handle type="source" position="bottom" style={{ background: '#555' }} />
</div>
);
}
17 changes: 17 additions & 0 deletions src/vial-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading