Browse Source

Fix Thumbnail API

pull/140/head
Jānis Skarnelis 3 years ago
parent
commit
bc2607e64d
  1. 2
      dist/fancybox.esm.js
  2. 2
      dist/fancybox.umd.js
  3. 38
      src/Fancybox/plugins/Thumbs/Thumbs.js

2
dist/fancybox.esm.js

File diff suppressed because one or more lines are too long

2
dist/fancybox.umd.js

File diff suppressed because one or more lines are too long

38
src/Fancybox/plugins/Thumbs/Thumbs.js

@ -157,42 +157,38 @@ export class Thumbs {
*/
toggle() {
if (this.state === "visible") {
this.Carousel.Panzoom.detachEvents();
this.$container.style.display = "none";
this.state = "hidden";
return;
this.hide();
} else if (this.state === "hidden") {
this.show();
} else {
this.build();
}
}
/**
* Show thumbnail list
*/
show() {
if (this.state === "hidden") {
this.$container.style.display = "";
this.Carousel.Panzoom.attachEvents();
this.state = "visible";
return;
}
this.build();
}
/**
* Show thumbnail list
*/
show() {
this.state = "hidden";
this.toggle();
}
/**
* Hide thumbnail list
*/
hide() {
this.state = "visible";
this.toggle();
if (this.state === "visible") {
this.Carousel.Panzoom.detachEvents();
this.$container.style.display = "none";
this.state = "hidden";
}
}
/**

Loading…
Cancel
Save