disable click-to-zoom on image

so we can release before the lightbox ix ready
This commit is contained in:
Bruno Windels 2020-10-29 10:17:19 +01:00
parent b69464b87d
commit 0405af0116

View File

@ -27,12 +27,10 @@ export class ImageView extends TemplateView {
width: vm.thumbnailWidth,
height: vm.thumbnailHeight,
loading: "lazy",
alt: vm.label,
alt: vm => vm.label,
title: vm => vm.label,
});
const linkContainer = t.a({
href: "#",
onClick: evt => this.openImage(evt),
target: "_blank",
style: `padding-top: ${heightRatioPercent}%; width: ${vm.thumbnailWidth}px;`
}, image);
@ -40,14 +38,4 @@ export class ImageView extends TemplateView {
[t.div(linkContainer), t.p(t.time(vm.date + " " + vm.time))]
);
}
async openImage(evt) {
const link = evt.currentTarget;
if (link.getAttribute("href") === "#") {
evt.preventDefault();
const url = await this.value.loadImageUrl();
link.setAttribute("href", url);
link.click();
}
}
}