| 209 | } |
| 210 | |
| 211 | function createNoteNode(note: typeof notes[0], visible: boolean, position?: { x: number; y: number }): Node { |
| 212 | return { |
| 213 | id: note.id, |
| 214 | type: 'note', |
| 215 | position: position || positions[note.id], |
| 216 | data: { content: note.content, color: note.color }, |
| 217 | style: { |
| 218 | opacity: visible ? 1 : 0, |
| 219 | transition: 'opacity 0.5s ease-in-out', |
| 220 | pointerEvents: visible ? 'auto' : 'none', |
| 221 | }, |
| 222 | draggable: true, |
| 223 | selectable: false, |
| 224 | connectable: false, |
| 225 | }; |
| 226 | } |
| 227 | |
| 228 | function App() { |
| 229 | const [visibleCount, setVisibleCount] = useState(1); |