feat: add VNC display zoom controls (#1314)

This commit is contained in:
ZacharyZcR
2026-08-24 05:31:14 +08:00
committed by GitHub
parent 20eca69d56
commit c476ef6b3b
7 changed files with 211 additions and 25 deletions
@@ -0,0 +1,11 @@
export const MIN_GUACAMOLE_ZOOM = 0.5;
export const MAX_GUACAMOLE_ZOOM = 4;
export const GUACAMOLE_ZOOM_STEP = 0.25;
export function clampGuacamoleZoom(zoom: number): number {
return Math.min(MAX_GUACAMOLE_ZOOM, Math.max(MIN_GUACAMOLE_ZOOM, zoom));
}
export function stepGuacamoleZoom(zoom: number, direction: -1 | 1): number {
return clampGuacamoleZoom(zoom + direction * GUACAMOLE_ZOOM_STEP);
}