Skip to content

Commit

Permalink
add code to initialize view3d from props before we start loading imag…
Browse files Browse the repository at this point in the history
…e data
  • Loading branch information
toloudis committed Nov 27, 2023
1 parent e1db0a3 commit 32eef7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/aics-image-viewer/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,11 @@ const App: React.FC<AppProps> = (props) => {
return () => window.removeEventListener("resize", onResizeDebounced);
}, []);

// one-time init after view3d exists and before we start loading images
useEffect(() => {
view3d.setCameraMode(viewerSettings.viewMode);
});

// Hook to trigger image load: on mount, when image source props/state change (`cellId`, `imageType`, `time`)
useEffect(() => {
if (props.rawDims && props.rawData) {
Expand Down

0 comments on commit 32eef7e

Please sign in to comment.