[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 a8sLinkTarget: HTMLDivElement;
|
||||||
let a8sLinkAddress: string;
|
let a8sLinkAddress: string;
|
||||||
|
@ -174,7 +177,7 @@
|
||||||
|
|
||||||
function clicked() {
|
function clicked() {
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement) {
|
||||||
if (!editable) {
|
if (!editable && !hasAnnotations) {
|
||||||
imageEl.requestFullscreen();
|
imageEl.requestFullscreen();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -183,7 +186,11 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="image-viewer" class:editable on:click={clicked}>
|
<div
|
||||||
|
class="image-viewer"
|
||||||
|
class:zoomable={!editable && !hasAnnotations}
|
||||||
|
on:click={clicked}
|
||||||
|
>
|
||||||
{#if !imageLoaded}
|
{#if !imageLoaded}
|
||||||
<Spinner centered />
|
<Spinner centered />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -223,7 +230,7 @@
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.editable) {
|
&.zoomable {
|
||||||
cursor: zoom-in;
|
cursor: zoom-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue