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(
(props: RenderImageProps) => {
return (
<ImageWallItem
{...props}
maxHeight={
targetRowHeight(containerRef.current?.offsetWidth ?? 0) *
maxHeightFactor
}
/>
);
// #6165 - only use targetRowHeight in row direction
const maxHeight =
props.direction === "column"
? props.photo.height
: targetRowHeight(containerRef.current?.offsetWidth ?? 0) *
maxHeightFactor;
return <ImageWallItem {...props} maxHeight={maxHeight} />;
},
[targetRowHeight]
);