mirror of
https://github.com/usememos/memos.git
synced 2025-12-19 23:29:26 +08:00
chore: update masonry scale
This commit is contained in:
parent
7592e5fe76
commit
36d458fe88
1 changed files with 1 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ const MasonryView = (props: Props) => {
|
||||||
const containerWidth = containerRef.current.offsetWidth;
|
const containerWidth = containerRef.current.offsetWidth;
|
||||||
const scale = containerWidth / MINIMUM_MEMO_VIEWPORT_WIDTH;
|
const scale = containerWidth / MINIMUM_MEMO_VIEWPORT_WIDTH;
|
||||||
setState({
|
setState({
|
||||||
columns: scale > 2 ? Math.floor(scale) : 1,
|
columns: scale >= 2 ? Math.round(scale) : 1,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue