Gallery: fix calculation of folder thumbnail selection
This commit is contained in:
parent
fbad1da9e2
commit
d5e9c7d572
|
@ -69,7 +69,7 @@ Albums={
|
|||
if (albumMetadata == undefined) {
|
||||
return;
|
||||
}
|
||||
var x = Math.min(Math.floor((e.clientX - this.offsetLeft)/(this.offsetWidth/albumMetadata.numOfCovers)), albumMetadata.numOfCovers-1);
|
||||
var x = Math.min(Math.floor((e.layerX - this.offsetLeft)/(this.offsetWidth/albumMetadata.numOfCovers)), albumMetadata.numOfCovers-1);
|
||||
x *= this.offsetWidth;
|
||||
$(this).css('background-position', -x+'px 0');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue