More control over how gallery selects images from events

This commit is contained in:
space-nuko
2023-05-22 20:42:41 -05:00
parent 6817e6ad95
commit e90773fdc8
14 changed files with 96 additions and 25 deletions

View File

@@ -9,6 +9,8 @@ import workflowState from "./stores/workflowState";
import { ImageViewer } from "./ImageViewer";
export function clamp(n: number, min: number, max: number): number {
if (max <= min)
return min;
return Math.min(Math.max(n, min), max)
}