image loading fixes (fixes #1345)
This commit is contained in:
parent
7428738b23
commit
67799a508a
@ -57,7 +57,7 @@ function ImageOriginal ({ src, topLevel, rel, tab, children, onClick, ...props }
|
|||||||
target='_blank'
|
target='_blank'
|
||||||
rel={rel ?? UNKNOWN_LINK_REL}
|
rel={rel ?? UNKNOWN_LINK_REL}
|
||||||
href={src}
|
href={src}
|
||||||
>{isRawURL ? src : children}
|
>{isRawURL || !children ? src : children}
|
||||||
</a>
|
</a>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ export default memo(function Text ({ rel, imgproxyUrls, children, tab, itemId, o
|
|||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
const srcSet = imgproxyUrls?.[url]
|
const srcSet = imgproxyUrls?.[url]
|
||||||
return <ZoomableImage srcSet={srcSet} tab={tab} src={src} rel={rel ?? UNKNOWN_LINK_REL} {...props} topLevel />
|
return <ZoomableImage srcSet={srcSet} tab={tab} src={src} rel={rel ?? UNKNOWN_LINK_REL} {...props} topLevel={topLevel} />
|
||||||
}, [imgproxyUrls, topLevel, tab])
|
}, [imgproxyUrls, topLevel, tab])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -129,16 +129,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.text img {
|
.text img {
|
||||||
--height: 35vh;
|
|
||||||
--width: 100%;
|
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: .5rem;
|
margin-top: .5rem;
|
||||||
margin-bottom: .5rem;
|
margin-bottom: .5rem;
|
||||||
width: auto;
|
max-width: 100%;
|
||||||
max-width: min(var(--width), 100%);
|
|
||||||
cursor: zoom-in;
|
cursor: zoom-in;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-height: min(var(--height), 25vh);
|
max-height: 25vh;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
object-position: left top;
|
object-position: left top;
|
||||||
min-width: 50%;
|
min-width: 50%;
|
||||||
@ -148,7 +145,7 @@
|
|||||||
.text img.topLevel {
|
.text img.topLevel {
|
||||||
margin-top: .75rem;
|
margin-top: .75rem;
|
||||||
margin-bottom: .75rem;
|
margin-bottom: .75rem;
|
||||||
max-height: min(var(--height), 35vh);
|
max-height: 35vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.fullScreen {
|
img.fullScreen {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user