More control over how gallery selects images from events
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user