From e4c7c4ea2e440544d43defd4207eee209c4b5303 Mon Sep 17 00:00:00 2001 From: Jennings Zhang Date: Wed, 6 Dec 2023 09:59:06 -0500 Subject: [PATCH] Change syncWith to broadcastTo --- src/SurfaceAndMaskViewer/index.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/SurfaceAndMaskViewer/index.tsx b/src/SurfaceAndMaskViewer/index.tsx index 552e437..6f840ef 100644 --- a/src/SurfaceAndMaskViewer/index.tsx +++ b/src/SurfaceAndMaskViewer/index.tsx @@ -29,14 +29,8 @@ const SubplateSurfaces = ({ visualState }: { visualState: VisualState }) => { const init = async () => { await Promise.all([initMeshCanvas(), initVolumeCanvas()]); syncNiivueSettings(); - volumeNvRef.current.syncWith(meshNvRef.current, { - "3d": true, - "2d": true, - }); - meshNvRef.current.syncWith(volumeNvRef.current, { - "3d": true, - "2d": true, - }); + volumeNvRef.current.broadcastTo(meshNvRef.current); + meshNvRef.current.broadcastTo(volumeNvRef.current); }; const initVolumeCanvas = async () => {