2021-08-05 03:24:04 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
2021-10-18 14:01:15 +02:00
|
|
|
import { getContext } from "svelte";
|
2022-05-13 04:57:07 +02:00
|
|
|
import { createEventDispatcher, onMount } from "svelte";
|
2022-02-04 09:36:34 +01:00
|
|
|
import type { Readable } from "svelte/store";
|
|
|
|
|
|
|
|
import { directionKey } from "../lib/context-keys";
|
2021-08-05 03:24:04 +02:00
|
|
|
|
2021-10-18 14:01:15 +02:00
|
|
|
const direction = getContext<Readable<"ltr" | "rtl">>(directionKey);
|
2021-08-05 03:24:04 +02:00
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
|
|
|
|
onMount(() => dispatch("mount"));
|
|
|
|
</script>
|
|
|
|
|
2022-05-13 04:57:07 +02:00
|
|
|
<div class="image-handle-dimensions" class:is-rtl={$direction === "rtl"}>
|
2021-08-05 03:24:04 +02:00
|
|
|
<slot />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
div {
|
|
|
|
position: absolute;
|
2022-05-13 04:57:07 +02:00
|
|
|
width: fit-content;
|
2021-08-05 03:24:04 +02:00
|
|
|
|
2022-05-13 04:57:07 +02:00
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 3px;
|
|
|
|
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
2021-08-05 03:24:04 +02:00
|
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
color: white;
|
|
|
|
background-color: rgba(0 0 0 / 0.3);
|
|
|
|
border-color: black;
|
2021-08-31 23:10:16 +02:00
|
|
|
border-radius: 5px;
|
2021-08-05 03:24:04 +02:00
|
|
|
padding: 0 5px;
|
|
|
|
|
2022-05-13 04:57:07 +02:00
|
|
|
pointer-events: none;
|
|
|
|
user-select: none;
|
2021-08-05 03:24:04 +02:00
|
|
|
}
|
|
|
|
</style>
|