Skip to content

Commit

Permalink
Merge branch 'main' into feature/react18perf-functionize
Browse files Browse the repository at this point in the history
  • Loading branch information
toloudis committed Dec 18, 2024
2 parents cd47ad5 + 63d6dab commit fbfd4fb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aics/web-3d-viewer",
"version": "2.10.2",
"version": "2.10.3",
"description": "web view of cell volume images",
"repository": "github:allen-cell-animated/website-3d-cell-viewer",
"main": "es/index.js",
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 @@ -190,8 +190,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 @@ -262,7 +262,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 @@ -313,14 +313,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 @@ -404,7 +404,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
6 changes: 3 additions & 3 deletions src/aics-image-viewer/components/StyleProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ const theme = {
bannerBg: "#020202DB",
},
statusFlag: {
bg: palette.veryLtPurple,
text: palette.veryDarkPurple,
border: palette.medGrey,
text: palette.ltGrey,
},
layout: {
dividers: palette.medGrey,
Expand Down Expand Up @@ -204,7 +204,7 @@ const CssProvider = styled.div<{ $theme: AppTheme }>`
--color-landingpage-text: ${$theme.colors.landingPage.text};
--color-landingpage-banner-highlight-bg: ${$theme.colors.landingPage.bannerBg};
--color-statusflag-bg: ${$theme.colors.statusFlag.bg};
--color-statusflag-border: ${$theme.colors.statusFlag.border};
--color-statusflag-text: ${$theme.colors.statusFlag.text};
--color-layout-dividers: ${$theme.colors.layout.dividers};
Expand Down
6 changes: 3 additions & 3 deletions website/components/LandingPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ const DatasetCard = styled.li`
const InReviewFlag = styled(FlexRowAlignCenter)`
border-radius: 4px;
padding: 1px 6px;
background-color: var(--color-statusflag-bg);
height: 22px;
border: 1px solid var(--color-statusflag-border);
height: 23px;
flex-wrap: wrap;
&& > p {
margin-bottom: 0;
color: var(--color-statusflag-text);
font-size: 11px;
font-weight: 600;
font-weight: 500;
white-space: nowrap;
}
`;
Expand Down

0 comments on commit fbfd4fb

Please sign in to comment.