viewer: improve tap

pull/175/head
Varun Patil 2022-11-05 19:40:04 -07:00 committed by Varun Patil
parent 4ea004abac
commit 084169a5a9
1 changed files with 7 additions and 2 deletions

View File

@ -212,6 +212,9 @@ export default class Viewer extends Mixins(GlobalMixin) {
this.opened = false; this.opened = false;
this.hideSidebar(); this.hideSidebar();
}); });
this.photoswipe.on("tapAction", () => {
this.opened = !this.opened; // toggle-controls
});
this.photoswipe.on("destroy", () => { this.photoswipe.on("destroy", () => {
document.body.classList.remove(klass); document.body.classList.remove(klass);
navElem.style.zIndex = ""; navElem.style.zIndex = "";
@ -486,7 +489,7 @@ export default class Viewer extends Mixins(GlobalMixin) {
background-color: transparent !important; background-color: transparent !important;
} }
transition: opacity 0.12s ease-in-out; transition: opacity 0.2s ease-in-out;
opacity: 0; opacity: 0;
&.opened { &.opened {
opacity: 1; opacity: 1;
@ -494,7 +497,9 @@ export default class Viewer extends Mixins(GlobalMixin) {
} }
.fullyOpened :deep .pswp__container { .fullyOpened :deep .pswp__container {
@media (min-width: 1024px) {
transition: transform var(--pswp-transition-duration) ease !important; transition: transform var(--pswp-transition-duration) ease !important;
}
} }
.inner, .inner,