1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fixed images to be under node

This commit is contained in:
Fedor Katurov 2020-04-21 16:35:14 +07:00
parent 335c9b6523
commit 650e62cfa1
4 changed files with 106 additions and 84 deletions

View file

@ -165,7 +165,8 @@ const NodeImageSlideBlock: FC<IProps> = ({
const updateMaxHeight = useCallback(() => {
if (!wrap.current) return;
const { width } = wrap.current.getBoundingClientRect();
setMaxHeight(width * NODE_SETTINGS.MAX_IMAGE_ASPECT);
// setMaxHeight(width * NODE_SETTINGS.MAX_IMAGE_ASPECT);
setMaxHeight(window.innerHeight - 175);
normalizeOffset();
}, [wrap, setMaxHeight, normalizeOffset]);