MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / disposeOverlays

Method disposeOverlays

src/worker/ChartGPUWorkerProxy.ts:1025–1056  ·  view source on GitHub ↗

* Disposes all DOM overlays and cleans up RAF batching.

()

Source from the content-addressed store, hash-verified

1023 * Disposes all DOM overlays and cleans up RAF batching.
1024 */
1025 private disposeOverlays(): void {
1026 // Cancel any pending RAF for overlay updates
1027 if (this.overlayUpdateRafId !== null) {
1028 cancelAnimationFrame(this.overlayUpdateRafId);
1029 this.overlayUpdateRafId = null;
1030 }
1031
1032 // Clear pending updates
1033 this.pendingOverlayUpdates = {};
1034
1035 // Dispose all overlays
1036 this.tooltip?.dispose();
1037 this.tooltip = null;
1038
1039 this.legend?.dispose();
1040 this.legend = null;
1041
1042 this.textOverlay?.dispose();
1043 this.textOverlay = null;
1044
1045 this.annotationTextOverlay?.dispose();
1046 this.annotationTextOverlay = null;
1047
1048 this.dataZoomSlider?.dispose();
1049 this.dataZoomSlider = null;
1050
1051 // Remove slider host from DOM
1052 this.dataZoomSliderHost?.remove();
1053 this.dataZoomSliderHost = null;
1054
1055 this.zoomState = null;
1056 }
1057
1058 /**
1059 * Schedules overlay updates in the next RAF to batch multiple updates.

Callers 2

setOptionMethod · 0.95
disposeMethod · 0.95

Calls 1

disposeMethod · 0.65

Tested by

no test coverage detected