ps-image: fix content load image
parent
8ae1fc8ddd
commit
da6c681bbf
|
@ -10,6 +10,7 @@ export default class ImageContentSetup {
|
|||
|
||||
initLightboxEvents(lightbox: PhotoSwipe) {
|
||||
lightbox.on("contentLoad", this.onContentLoad.bind(this));
|
||||
lightbox.on("contentLoadImage", this.onContentLoadImage.bind(this));
|
||||
}
|
||||
|
||||
onContentLoad(e) {
|
||||
|
@ -32,4 +33,9 @@ export default class ImageContentSetup {
|
|||
};
|
||||
});
|
||||
}
|
||||
|
||||
onContentLoadImage(e) {
|
||||
if (isVideoContent(e.content) || isLiveContent(e.content)) return;
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue