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'
 | 
			
		||||
        rel={rel ?? UNKNOWN_LINK_REL}
 | 
			
		||||
        href={src}
 | 
			
		||||
      >{isRawURL ? src : children}
 | 
			
		||||
      >{isRawURL || !children ? src : children}
 | 
			
		||||
      </a>
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -150,7 +150,7 @@ export default memo(function Text ({ rel, imgproxyUrls, children, tab, itemId, o
 | 
			
		||||
      return 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])
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
 | 
			
		||||
@ -129,16 +129,13 @@
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.text img {
 | 
			
		||||
    --height: 35vh;
 | 
			
		||||
    --width: 100%;
 | 
			
		||||
    display: block;
 | 
			
		||||
    margin-top: .5rem;
 | 
			
		||||
    margin-bottom: .5rem;
 | 
			
		||||
    width: auto;
 | 
			
		||||
    max-width: min(var(--width), 100%);
 | 
			
		||||
    max-width: 100%;
 | 
			
		||||
    cursor: zoom-in;
 | 
			
		||||
    height: auto;
 | 
			
		||||
    max-height: min(var(--height), 25vh);
 | 
			
		||||
    max-height: 25vh;
 | 
			
		||||
    object-fit: contain;
 | 
			
		||||
    object-position: left top;
 | 
			
		||||
    min-width: 50%;
 | 
			
		||||
@ -148,7 +145,7 @@
 | 
			
		||||
.text img.topLevel {
 | 
			
		||||
    margin-top: .75rem;
 | 
			
		||||
    margin-bottom: .75rem;
 | 
			
		||||
    max-height: min(var(--height), 35vh);
 | 
			
		||||
    max-height: 35vh;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
img.fullScreen {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user