mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -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');
|
btnFull = ebi('bbox-full');
|
||||||
btnVmode = ebi('bbox-vmode');
|
btnVmode = ebi('bbox-vmode');
|
||||||
btnClose = ebi('bbox-close');
|
btnClose = ebi('bbox-close');
|
||||||
bindEvents();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function halp() {
|
function halp() {
|
||||||
|
@ -882,7 +881,17 @@ window.baguetteBox = (function () {
|
||||||
else
|
else
|
||||||
timer.rm(rotn);
|
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(ebi('bbox-btns'), 'off', 't');
|
||||||
clmod(btnPrev, 'off', 't');
|
clmod(btnPrev, 'off', 't');
|
||||||
clmod(btnNext, 'off', 't');
|
clmod(btnNext, 'off', 't');
|
||||||
|
@ -924,7 +933,6 @@ window.baguetteBox = (function () {
|
||||||
function destroyPlugin() {
|
function destroyPlugin() {
|
||||||
unbindEvents();
|
unbindEvents();
|
||||||
clearCachedData();
|
clearCachedData();
|
||||||
unbindEvents();
|
|
||||||
document.getElementsByTagName('body')[0].removeChild(ebi('bbox-overlay'));
|
document.getElementsByTagName('body')[0].removeChild(ebi('bbox-overlay'));
|
||||||
data = {};
|
data = {};
|
||||||
currentGallery = [];
|
currentGallery = [];
|
||||||
|
|
Loading…
Reference in a new issue