Fix column layout image wall issues (#6168)

This commit is contained in:
WithoutPants
2025-10-22 12:21:04 +11:00
committed by GitHub
parent 947a17355c
commit 98df51755e

View File

@@ -116,15 +116,13 @@ const ImageWall: React.FC<IImageWallProps> = ({
const renderImage = useCallback( const renderImage = useCallback(
(props: RenderImageProps) => { (props: RenderImageProps) => {
return ( // #6165 - only use targetRowHeight in row direction
<ImageWallItem const maxHeight =
{...props} props.direction === "column"
maxHeight={ ? props.photo.height
targetRowHeight(containerRef.current?.offsetWidth ?? 0) * : targetRowHeight(containerRef.current?.offsetWidth ?? 0) *
maxHeightFactor maxHeightFactor;
} return <ImageWallItem {...props} maxHeight={maxHeight} />;
/>
);
}, },
[targetRowHeight] [targetRowHeight]
); );