{#if activeImage}
{
const { reason, originalEvent } = detail;
if (reason === "outsideClick") {
// If the click is still in the overlay, we do not want
// to reset the handle either
if (!originalEvent.path.includes(imageOverlay)) {
await resetHandle();
}
} else {
await resetHandle();
}
}}
>
{
positionOverlay();
positionFloating();
}}
/>
{
toggleActualSize();
positionOverlay();
}}
on:imageclear={() => {
clearActualSize();
positionOverlay();
}}
/>
{
if (shrinkingDisabled) {
return;
}
toggleActualSize();
positionOverlay();
}}
/>
{#if isSizeConstrained}
{`(${tr.editingDoubleClickToExpand()})`}
{:else}
{actualWidth}×{actualHeight}
{#if customDimensions}
(Original: {naturalWidth}×{naturalHeight})
{/if}
{/if}
{
if (!isSizeConstrained) {
setPointerCapture(event);
}
}}
on:pointermove={(event) => {
resize(event);
}}
/>
{/if}