mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
bbox: tap left/right side of image for prev/next
This commit is contained in:
parent
d6ac224c8f
commit
49efffd740
|
@ -202,7 +202,6 @@ window.baguetteBox = (function () {
|
|||
btnFull = ebi('bbox-full');
|
||||
btnVmode = ebi('bbox-vmode');
|
||||
btnClose = ebi('bbox-close');
|
||||
bindEvents();
|
||||
}
|
||||
|
||||
function halp() {
|
||||
|
@ -882,7 +881,17 @@ window.baguetteBox = (function () {
|
|||
else
|
||||
timer.rm(rotn);
|
||||
|
||||
el.onclick = function () {
|
||||
el.onclick = function (e) {
|
||||
var rc = e.target.getBoundingClientRect(),
|
||||
x = e.clientX - rc.left,
|
||||
fx = x / (rc.right - rc.left);
|
||||
|
||||
if (fx < 0.3)
|
||||
return showPreviousImage();
|
||||
|
||||
if (fx > 0.7)
|
||||
return showNextImage();
|
||||
|
||||
clmod(ebi('bbox-btns'), 'off', 't');
|
||||
clmod(btnPrev, 'off', 't');
|
||||
clmod(btnNext, 'off', 't');
|
||||
|
@ -924,7 +933,6 @@ window.baguetteBox = (function () {
|
|||
function destroyPlugin() {
|
||||
unbindEvents();
|
||||
clearCachedData();
|
||||
unbindEvents();
|
||||
document.getElementsByTagName('body')[0].removeChild(ebi('bbox-overlay'));
|
||||
data = {};
|
||||
currentGallery = [];
|
||||
|
|
Loading…
Reference in a new issue