diff --git a/app/javascript/controllers/hints_controller.js b/app/javascript/controllers/hints_controller.js index cb47cb5..e380155 100644 --- a/app/javascript/controllers/hints_controller.js +++ b/app/javascript/controllers/hints_controller.js @@ -15,7 +15,7 @@ export default class extends Controller { this.hint = document.createElement("div"); - this.hint.innerText = "click to go =>, click left edge to go <="; + this.hint.innerText = "click to 👉, click left edge to 👈"; this.hint.innerText += isMobile ? " | flip phone to resize" diff --git a/app/javascript/controllers/random_image_controller.js b/app/javascript/controllers/random_image_controller.js index 33a3677..1a837bf 100644 --- a/app/javascript/controllers/random_image_controller.js +++ b/app/javascript/controllers/random_image_controller.js @@ -17,26 +17,14 @@ export default class extends Controller { static outlets = ["sessions"]; connect() { - console.log(this.sessionsOutlet.sessionIdValue); - - console.log( - "Hello from RandomImageController, imgproxyUrl:", - this.imgproxyUrlValue - ); - this.imageDisplayTarget.src = this.imgproxyUrlValue; - - const urlParams = new URLSearchParams(window.location.search); - if (!urlParams.has("page")) { - urlParams.set("page", 1); - } // Add event listener to intercept clicks on the viewport document.addEventListener("click", this.handleClick.bind(this)); } handleClick(event) { - // Calculate the width of the left 50% of the screen - const leftBoundary = window.innerWidth * 0.5; + // Calculate the width of the left 20% of the screen + const leftBoundary = window.innerWidth * 0.2; // Check if the click target is the draggable box or its children if (!event.target.closest("[data-controller='draggable']")) {