From 8550b4fea51429e2060c47696c1fe31041ac5aad Mon Sep 17 00:00:00 2001 From: Damian Murawski Date: Wed, 25 Jan 2023 23:15:12 +0100 Subject: [PATCH] fix problem with click precision on ReferenceStrip temporary fix for #1992 . Just adding 4px which works in all use cases. --- src/referencestrip.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/referencestrip.js b/src/referencestrip.js index c5d58c75..d56b8012 100644 --- a/src/referencestrip.js +++ b/src/referencestrip.js @@ -300,7 +300,8 @@ function onStripClick( event ) { var page; if ( 'horizontal' === this.scroll ) { - page = Math.floor(event.position.x / this.panelWidth); + // +4px fix to solve problem with precision on thumbnail selection if there is a lot of them + page = Math.floor(event.position.x / (this.panelWidth + 4)); } else { page = Math.floor(event.position.y / this.panelHeight); }