Fix Gallery GIF animation

This commit is contained in:
Zixaphir 2013-08-21 04:47:39 -07:00
parent 2f9e7a06d7
commit 19631dee68
3 changed files with 26 additions and 9 deletions

View File

@ -8910,12 +8910,18 @@
}
},
open: function(e) {
var img;
if (e) {
e.preventDefault();
}
Gallery.current.dataset.id = this.dataset.id;
Gallery.url.href = Gallery.current.src = this.href;
Gallery.url.download = Gallery.current.title = this.title;
img = $.el('img', {
src: Gallery.url.href = this.href,
title: Gallery.url.download = this.title
});
img.dataset.id = this.dataset.id;
$.replace(Gallery.current, img);
Gallery.current = img;
return Gallery.url.parentElement.scrollTop = 0;
},
prev: function() {

View File

@ -8898,12 +8898,18 @@
}
},
open: function(e) {
var img;
if (e) {
e.preventDefault();
}
Gallery.current.dataset.id = this.dataset.id;
Gallery.url.href = Gallery.current.src = this.href;
Gallery.url.download = Gallery.current.title = this.title;
img = $.el('img', {
src: Gallery.url.href = this.href,
title: Gallery.url.download = this.title
});
img.dataset.id = this.dataset.id;
$.replace(Gallery.current, img);
Gallery.current = img;
return Gallery.url.parentElement.scrollTop = 0;
},
prev: function() {

View File

@ -99,9 +99,14 @@ Gallery =
open: (e) ->
if e
e.preventDefault()
Gallery.current.dataset.id = @dataset.id
Gallery.url.href = Gallery.current.src = @href
Gallery.url.download = Gallery.current.title = @title
img = $.el 'img',
src: Gallery.url.href = @href
title: Gallery.url.download = @title
img.dataset.id = @dataset.id
$.replace Gallery.current, img
Gallery.current = img
Gallery.url.parentElement.scrollTop = 0
prev: ->
Gallery.cb.open.call Gallery.images[+Gallery.current.dataset.id - 1]