mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Merge pull request #2280 from damonsson/patch-1
fix problem with click precision on ReferenceStrip
This commit is contained in:
commit
dbb60cf026
@ -300,7 +300,8 @@ function onStripClick( event ) {
|
|||||||
var page;
|
var page;
|
||||||
|
|
||||||
if ( 'horizontal' === this.scroll ) {
|
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 {
|
} else {
|
||||||
page = Math.floor(event.position.y / this.panelHeight);
|
page = Math.floor(event.position.y / this.panelHeight);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user