2025-11-12 18:26:18 +00:00
|
|
|
{{define "zoom-control"}}
|
2025-11-12 22:54:46 +00:00
|
|
|
<!-- Zoom Control (Fixed Bottom Center, Draggable) - Hyperscript Enhanced -->
|
2025-11-30 10:13:37 +00:00
|
|
|
<div id="zoom-control" class="zoom-control no-print zoom-hidden" role="group" aria-label="{{.UI.Widgets.ZoomControl.GroupLabel}}"
|
2025-11-30 05:58:44 +00:00
|
|
|
_="on load call initZoomControl(me)
|
2025-11-30 06:30:51 +00:00
|
|
|
on mousedown(clientX, clientY) if isZoomDragTarget(event.target) call startZoomDrag(me, clientX, clientY) then halt the event end
|
|
|
|
|
on mousemove(clientX, clientY) from document if moveZoomDrag(me, clientX, clientY) halt the event end
|
|
|
|
|
on mouseup from document call endZoomDrag(me)">
|
2025-11-12 22:54:46 +00:00
|
|
|
|
2025-11-12 18:26:18 +00:00
|
|
|
<button
|
|
|
|
|
id="zoom-close"
|
|
|
|
|
class="zoom-close-btn"
|
2025-11-30 10:13:37 +00:00
|
|
|
aria-label="{{.UI.Widgets.ZoomControl.CloseLabel}}"
|
|
|
|
|
title="{{.UI.Widgets.ZoomControl.CloseTitle}}"
|
2025-11-30 06:03:45 +00:00
|
|
|
_="on click call hideZoomControl()">
|
2025-11-16 12:48:12 +00:00
|
|
|
<iconify-icon icon="mdi:close" width="16" height="16" style="pointer-events: none;"></iconify-icon>
|
2025-11-12 18:26:18 +00:00
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<span class="zoom-value zoom-value-min" aria-hidden="true">25</span>
|
|
|
|
|
|
|
|
|
|
<input
|
|
|
|
|
type="range"
|
|
|
|
|
id="zoom-slider"
|
|
|
|
|
class="zoom-slider"
|
|
|
|
|
min="25"
|
2025-11-17 17:03:17 +00:00
|
|
|
max="300"
|
2025-11-12 18:26:18 +00:00
|
|
|
step="1"
|
|
|
|
|
value="100"
|
2025-11-30 10:13:37 +00:00
|
|
|
aria-label="{{.UI.Widgets.ZoomControl.SliderLabel}}"
|
2025-11-12 18:26:18 +00:00
|
|
|
aria-valuemin="25"
|
2025-11-17 17:03:17 +00:00
|
|
|
aria-valuemax="300"
|
2025-11-12 18:26:18 +00:00
|
|
|
aria-valuenow="100"
|
2025-11-12 22:54:46 +00:00
|
|
|
aria-valuetext="100%"
|
2025-11-30 05:58:44 +00:00
|
|
|
_="on input call handleZoomInput(me)">
|
2025-11-12 18:26:18 +00:00
|
|
|
|
2025-11-17 17:03:17 +00:00
|
|
|
<span class="zoom-value zoom-value-max" aria-hidden="true">300</span>
|
2025-11-12 18:26:18 +00:00
|
|
|
|
|
|
|
|
<button
|
|
|
|
|
id="zoom-reset"
|
|
|
|
|
class="zoom-reset-btn"
|
2025-11-30 10:13:37 +00:00
|
|
|
aria-label="{{.UI.Widgets.ZoomControl.ResetLabel}}"
|
|
|
|
|
title="{{.UI.Widgets.ZoomControl.ResetTitle}}"
|
2025-11-12 22:54:46 +00:00
|
|
|
aria-live="polite"
|
2025-11-30 05:58:44 +00:00
|
|
|
_="on click call handleZoomReset()">
|
2025-11-12 18:26:18 +00:00
|
|
|
<span id="zoom-value-current">100</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|