[ui] disable click-to-fullscreen on annotated images
parent
40cc49d854
commit
d48e5346a7
|
@ -75,6 +75,9 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
$: hasAnnotations = $entity?.backlinks.some(
|
||||
(e) => e.attribute === "ANNOTATES"
|
||||
);
|
||||
|
||||
let a8sLinkTarget: HTMLDivElement;
|
||||
let a8sLinkAddress: string;
|
||||
|
@ -174,7 +177,7 @@
|
|||
|
||||
function clicked() {
|
||||
if (!document.fullscreenElement) {
|
||||
if (!editable) {
|
||||
if (!editable && !hasAnnotations) {
|
||||
imageEl.requestFullscreen();
|
||||
}
|
||||
} else {
|
||||
|
@ -183,7 +186,11 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<div class="image-viewer" class:editable on:click={clicked}>
|
||||
<div
|
||||
class="image-viewer"
|
||||
class:zoomable={!editable && !hasAnnotations}
|
||||
on:click={clicked}
|
||||
>
|
||||
{#if !imageLoaded}
|
||||
<Spinner centered />
|
||||
{/if}
|
||||
|
@ -223,7 +230,7 @@
|
|||
margin: auto;
|
||||
}
|
||||
|
||||
&:not(.editable) {
|
||||
&.zoomable {
|
||||
cursor: zoom-in;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue