(id: string, skipUndo = false)
| 2291 | } |
| 2292 | |
| 2293 | function removeAnnotation(id: string, skipUndo = false): void { |
| 2294 | const tracked = annotationMap.get(id); |
| 2295 | if (!tracked) return; |
| 2296 | if (!skipUndo) { |
| 2297 | pushEdit({ type: "remove", id, before: { ...tracked.def }, after: null }); |
| 2298 | } |
| 2299 | for (const el of tracked.elements) el.remove(); |
| 2300 | annotationMap.delete(id); |
| 2301 | selectedAnnotationIds.delete(id); |
| 2302 | updateAnnotationsBadge(); |
| 2303 | renderAnnotationPanel(); |
| 2304 | } |
| 2305 | // ============================================================================= |
| 2306 | // Annotation Panel → extracted to ./annotation-panel.ts |
| 2307 | // ============================================================================= |
no test coverage detected
searching dependent graphs…