Skip to content

Commit

Permalink
don't start loading data until channel state set up
Browse files Browse the repository at this point in the history
  • Loading branch information
toloudis committed Dec 6, 2023
1 parent cb8b4c6 commit e82f542
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/aics-image-viewer/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,14 @@ const App: React.FC<AppProps> = (props) => {
const thisChannelSettings = getOneChannelSetting(v.imageInfo.channelNames[channelIndex]);
onChannelDataLoaded(v, thisChannelSettings!, channelIndex, samePath);
});
loader.loadVolumeData(aimg);

const channelNames = aimg.imageInfo.channelNames;
const newChannelSettings = setChannelStateForNewImage(channelNames);

setAllChannelsUnloaded(channelNames.length);

// now that channel state is ready, we can initiate the first data load
loader.loadVolumeData(aimg);

imageUrlRef.current = fullUrl;
placeImageInViewer(aimg, newChannelSettings);
};
Expand Down

0 comments on commit e82f542

Please sign in to comment.