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

Function recreateCoordinator

src/ChartGPU.ts:766–782  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

764 };
765
766 const recreateCoordinator = (): void => {
767 if (disposed) return;
768 if (!gpuContext || !gpuContext.initialized) return;
769
770 const prevZoomRange = coordinator?.getZoomRange() ?? null;
771
772 unbindCoordinatorInteractionXChange();
773 // Coordinator recreation invalidates zoom subscriptions; recreate the slider if present.
774 disposeDataZoomSlider();
775 coordinator?.dispose();
776 coordinator = createRenderCoordinator(gpuContext, resolvedOptions, { onRequestRender: requestRender });
777 coordinatorTargetFormat = gpuContext.preferredFormat;
778 bindCoordinatorInteractionXChange();
779
780 if (prevZoomRange) coordinator.setZoomRange(prevZoomRange.start, prevZoomRange.end);
781 syncDataZoomUi();
782 };
783
784 const resizeInternal = (shouldRequestRenderAfterChanges: boolean): void => {
785 if (disposed) return;

Callers 2

resizeInternalFunction · 0.70
createChartGPUFunction · 0.70

Calls 8

createRenderCoordinatorFunction · 0.90
disposeDataZoomSliderFunction · 0.85
syncDataZoomUiFunction · 0.85
getZoomRangeMethod · 0.65
disposeMethod · 0.65
setZoomRangeMethod · 0.65

Tested by

no test coverage detected