From b27175bb7d3b8b2b4c8fdee0c873c6a8c6ab12ca Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Thu, 10 Apr 2025 07:02:52 -0400 Subject: [PATCH] Fixed clickDragger breaking on zoom-in. --- www/js/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/js/utils.js b/www/js/utils.js index ca4ca3a..f7ba5b8 100644 --- a/www/js/utils.js +++ b/www/js/utils.js @@ -531,9 +531,9 @@ class canopyUXUtils{ //get difference between mouse and left edge of element var difference = event.clientX - this.element.getBoundingClientRect().left; } - //check if we have a scrollbar because we're breaking shit - var pageBreak = document.body.scrollWidth - document.body.getBoundingClientRect().width; + //check if we have a scrollbar because we're breaking shit, make sure to round actual width so we don't break when zoomed in + var pageBreak = document.body.scrollWidth - Math.round(document.body.getBoundingClientRect().width); //if we're not breaking the page, or we're moving left if((!this.breakingScreen && pageBreak <= 0) || event.clientX < this.handle.getBoundingClientRect().left){