Skip to content

Commit

Permalink
Merge branch 'main' into fix/pr-preview-redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrimpCryptid committed Dec 24, 2024
2 parents 917f540 + 0dd6aed commit 3c96fd1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
22 changes: 10 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aics/web-3d-viewer",
"version": "2.10.3",
"version": "2.10.4",
"description": "web view of cell volume images",
"repository": "github:allen-cell-animated/website-3d-cell-viewer",
"main": "es/index.js",
Expand Down Expand Up @@ -41,7 +41,7 @@
"author": "Megan Riel-Mehan",
"license": "ISC",
"dependencies": {
"@aics/volume-viewer": "^3.12.2",
"@aics/volume-viewer": "^3.12.3",
"@ant-design/icons": "^5.2.5",
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
Expand Down
10 changes: 5 additions & 5 deletions src/aics-image-viewer/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ const App: React.FC<AppProps> = (props) => {

// State for image loading/reloading

// `true` when this is the initial load of an image
const initialLoadRef = useRef(true);
/** `true` when a channel's data has been loaded for the current image. */
const hasChannelLoadedRef = useRef<boolean[]>([]);
// `true` when image data has been requested, but no data has been received yet
const [sendingQueryRequest, setSendingQueryRequest] = useState(false);
// `true` when all channels of the current image are loaded
Expand Down Expand Up @@ -258,7 +258,7 @@ const App: React.FC<AppProps> = (props) => {

// If this is the first load of this image, auto-generate initial LUTs
if (
initialLoadRef.current ||
!hasChannelLoadedRef.current[channelIndex] ||
!thisChannelsSettings.controlPoints ||
!thisChannelsSettings.ramp ||
getChannelsAwaitingResetOnLoad().has(channelIndex)
Expand Down Expand Up @@ -309,14 +309,14 @@ const App: React.FC<AppProps> = (props) => {
if (aimg.channelNames[channelIndex] === getCurrentViewerChannelSettings()?.maskChannelName) {
view3d.setVolumeChannelAsMask(aimg, channelIndex);
}
hasChannelLoadedRef.current[channelIndex] = true;

// when any channel data has arrived:
setSendingQueryRequest(false);
setOneChannelLoaded(channelIndex);
if (aimg.isLoaded()) {
view3d.updateActiveChannels(aimg);
setImageLoaded(true);
initialLoadRef.current = false;
playControls.onImageLoaded();
}
};
Expand Down Expand Up @@ -400,7 +400,7 @@ const App: React.FC<AppProps> = (props) => {

setSendingQueryRequest(true);
setImageLoaded(false);
initialLoadRef.current = true;
hasChannelLoadedRef.current = [];

const loadSpec = new LoadSpec();
loadSpec.time = viewerState.current.time;
Expand Down

0 comments on commit 3c96fd1

Please sign in to comment.