summaryrefslogtreecommitdiffstats
path: root/apps/gallery
diff options
context:
space:
mode:
authorBartek Przybylski <bart.p.pl@gmail.com>2012-03-24 19:21:36 +0100
committerBartek Przybylski <bart.p.pl@gmail.com>2012-03-24 19:21:36 +0100
commitbe60b451eb7a152f19e31eeaf1b2f009eadb1a6b (patch)
tree8b645c71c39aa784a191754a335680b060ed131b /apps/gallery
parentafcf96549883e1ac9b87681ac7d5d0c3ea0cd513 (diff)
downloadnextcloud-server-be60b451eb7a152f19e31eeaf1b2f009eadb1a6b.tar.gz
nextcloud-server-be60b451eb7a152f19e31eeaf1b2f009eadb1a6b.zip
fix albums thumbnails preview for opera
Diffstat (limited to 'apps/gallery')
-rw-r--r--apps/gallery/js/albums.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gallery/js/albums.js b/apps/gallery/js/albums.js
index be121b2d70d..1fb38a5546c 100644
--- a/apps/gallery/js/albums.js
+++ b/apps/gallery/js/albums.js
@@ -67,14 +67,14 @@ Albums={
$(".gallery_album_cover", local).css('background-repeat', 'no-repeat');
$(".gallery_album_cover", local).css('background-position', '0');
$(".gallery_album_cover", local).css('background-image','url("'+OC.filePath('gallery','ajax','galleryOp.php')+'?operation=get_covers&albumname='+escape(a.name)+'")');
- $(".gallery_album_cover", local).mousemove(function(e) {
+ $(".gallery_album_cover", local).mousemove(function(event) {
var albumMetadata = Albums.find(this.title);
if (albumMetadata == undefined) {
return;
}
- var x = Math.floor((e.layerX - this.offsetLeft)/(this.offsetWidth/albumMetadata.numOfCovers));
+ var x = Math.floor(event.offsetX/(this.offsetWidth/albumMetadata.numOfCovers));
x *= this.offsetWidth;
- if (x < 0) x=0;
+ if (x < 0 || isNaN(x)) x=0;
$(this).css('background-position', -x+'px 0');
});
$(element).append(local);