Contain images without dims (#176)
parent
faa0866229
commit
699901c243
|
@ -470,7 +470,8 @@ export default class Viewer extends Mixins(GlobalMixin) {
|
||||||
// Get the thumbnail image
|
// Get the thumbnail image
|
||||||
this.photoswipe.addFilter("thumbEl", (thumbEl, data, index) => {
|
this.photoswipe.addFilter("thumbEl", (thumbEl, data, index) => {
|
||||||
const photo = this.list[index - this.globalAnchor];
|
const photo = this.list[index - this.globalAnchor];
|
||||||
if (!photo || photo.flag & this.c.FLAG_IS_VIDEO) return thumbEl;
|
if (!photo || !photo.w || !photo.h || photo.flag & this.c.FLAG_IS_VIDEO)
|
||||||
|
return thumbEl;
|
||||||
return this.thumbElem(photo) || thumbEl;
|
return this.thumbElem(photo) || thumbEl;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -840,6 +841,10 @@ export default class Viewer extends Mixins(GlobalMixin) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.pswp__img {
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
.pswp__button {
|
.pswp__button {
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue