MCPcopy Create free account
hub / github.com/error311/FileRise / clampGalleryColumns

Function clampGalleryColumns

public/js/fileListView.js:3083–3088  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

3081}
3082
3083function clampGalleryColumns(v) {
3084 const max = getGalleryMaxColumns();
3085 const n = parseInt(v, 10);
3086 const base = Number.isFinite(n) ? n : 3;
3087 return Math.max(1, Math.min(max, base));
3088}
3089
3090// Apply stored row height immediately so the table uses it on first render.
3091applyRowHeight(localStorage.getItem('rowHeight') || '44');

Callers 3

fileListView.jsFile · 0.85
applyGalleryColumnsFunction · 0.85
buildGalleryControlsFunction · 0.85

Calls 1

getGalleryMaxColumnsFunction · 0.85

Tested by

no test coverage detected