Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/components/Lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ function Lightbox({isAuthTokenRequired, source, onScaleChanged, onPress, onError
onError={onError}
onLoadEnd={() => setImageLoaded(true)}
onLoad={(e) => {
const width = (e.nativeEvent?.width || 0) / PixelRatio.get();
const height = (e.nativeEvent?.height || 0) / PixelRatio.get();
const width = (e.nativeEvent?.width || 0) * PixelRatio.get();
const height = (e.nativeEvent?.height || 0) * PixelRatio.get();
setImageDimensions({...imageDimensions, lightboxSize: {width, height}});
}}
/>
Expand All @@ -205,8 +205,8 @@ function Lightbox({isAuthTokenRequired, source, onScaleChanged, onPress, onError
isAuthTokenRequired={isAuthTokenRequired}
onLoadEnd={() => setFallbackLoaded(true)}
onLoad={(e) => {
const width = e.nativeEvent?.width || 0;
const height = e.nativeEvent?.height || 0;
const width = (e.nativeEvent?.width || 0) * PixelRatio.get();
const height = (e.nativeEvent?.height || 0) * PixelRatio.get();

if (imageDimensions?.lightboxSize != null) {
return;
Expand Down