From a81f7043fc44382775f9afac48e4c7a651e7ac6c Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 04 Jan 2026 18:29:10 +0000
Subject: [PATCH] =PopulateForm.js and ContentRoutes.php minor changes

---
 assets/js/concise/Gallery.js |   44 ++------------------------------------------
 1 files changed, 2 insertions(+), 42 deletions(-)

diff --git a/assets/js/concise/Gallery.js b/assets/js/concise/Gallery.js
index 9c3e0bd..4890b50 100644
--- a/assets/js/concise/Gallery.js
+++ b/assets/js/concise/Gallery.js
@@ -56,7 +56,7 @@
 				closeMessage: 'Closed Gallery',
 			}
 		);
-		this.modal.subscribe((event, data) => {
+		this.modal.subscribe((event) => {
 			if (event === 'modal-close') {
 				this.toggleGallery(false);
 			}
@@ -260,45 +260,6 @@
 		this.handleZoom(increment, e.clientX, e.clientY);
 	}
 
-	clampPan() {
-		const BORDER = 32; // 2rem
-		const wrap = this.ui.gallery.wrap;
-		if (!wrap) return;
-
-		const wrapRect = wrap.getBoundingClientRect();
-
-		// MUST use natural dimensions
-		const naturalW = 1920;
-		const naturalH = 1920;
-
-		// But they must be constrained by how the CSS fits them (max-width: 90vw, max-height: 85vh)
-		// So compute the base display size:
-		const displayRatio = Math.min(
-			wrapRect.width / naturalW,
-			wrapRect.height / naturalH
-		);
-
-		const baseWidth  = naturalW * displayRatio;
-		const baseHeight = naturalH * displayRatio;
-
-		const scaledWidth  = baseWidth  * this.zoom.scale;
-		const scaledHeight = baseHeight * this.zoom.scale;
-
-		// Allowed pan range
-		const minX = wrapRect.width - scaledWidth - BORDER;
-		const maxX = BORDER;
-
-		const minY = wrapRect.height - scaledHeight - BORDER;
-		const maxY = BORDER;
-
-		// clamp
-		this.zoom.x = Math.min(maxX, Math.max(minX, this.zoom.x));
-		this.zoom.y = Math.min(maxY, Math.max(minY, this.zoom.y));
-	}
-
-
-
-
 	handleZoom(increment, clientX=null, clientY=null) {
 		const oldScale = this.zoom.scale;
 		let newScale = oldScale + increment;
@@ -357,9 +318,8 @@
 	/**
 	 *
 	 * @param {boolean} open
-	 * @param {null|number} index
 	 */
-	toggleGallery(open, index= null) {
+	toggleGallery(open) {
 		if (open) {
 			// Disable native image dragging
 			this.ui.gallery.image.draggable = false;

--
Gitblit v1.10.0