mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
fixed minimal image height
This commit is contained in:
parent
408c09d795
commit
5e9fed4124
1 changed files with 4 additions and 2 deletions
|
@ -103,8 +103,10 @@ const NodeImageSlideBlock: FC<IProps> = ({ node, is_loading, updateLayout }) =>
|
|||
return () => clearTimeout(timeout);
|
||||
}
|
||||
|
||||
const prev = Math.max(heights[Math.floor(selected)] || fallback, fallback);
|
||||
const next = Math.max(heights[Math.ceil(selected)] || fallback, fallback);
|
||||
const minimal = Math.min(fallback, 120);
|
||||
|
||||
const prev = Math.max(heights[Math.floor(selected)] || fallback, minimal);
|
||||
const next = Math.max(heights[Math.ceil(selected)] || fallback, minimal);
|
||||
const now = prev - (prev - next) * (selected % 1);
|
||||
|
||||
if (current !== Math.round(selected)) setCurrent(Math.round(selected));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue