mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Details redesign tweaks and refactoring (#3995)
* Move loadStickyHeader to src/hooks * intl stashIDs * Scroll to top on component mount * Add id to gallery cover image and tweak merge functions * Add useTitleProps hook * Also scroll to top on list pages * Refactor loaders and tabs * Use classnames * Add DetailImage
This commit is contained in:
@@ -70,17 +70,6 @@ const ImageUtils = {
|
||||
onImageChange,
|
||||
usePasteImage,
|
||||
imageToDataURL,
|
||||
verifyImageSize,
|
||||
};
|
||||
|
||||
function verifyImageSize(e: React.UIEvent<HTMLImageElement>) {
|
||||
const img = e.target as HTMLImageElement;
|
||||
// set width = 200px if zero-sized image (SVG w/o intrinsic size)
|
||||
if (img.width === 0 && img.height === 0) {
|
||||
img.setAttribute("width", "200");
|
||||
} else {
|
||||
img.removeAttribute("width");
|
||||
}
|
||||
}
|
||||
|
||||
export default ImageUtils;
|
||||
|
||||
Reference in New Issue
Block a user