<script>
import Moveable, { DIRECTIONS } from "vue3-moveable";

export default {
    components: { Moveable },
    setup() {
        const onRender = e => {
            e.target.style.cssText += e.cssText;
        };
        return { DIRECTIONS, onRender };
    }
};
</script>
<template>
    <div class="root">
        <div
            class="target"
            style="transform-origin: top center;"
        >Target</div>
        <Moveable
            :target="'.target'"
            :draggable="true"
            :rotatable="({ renderDirections: DIRECTIONS })"
            :resolveAblesWithRotatable="({ resizable: ['nw', 'ne', 'sw', 'se'] })"
            :resizable="({ renderDirections: false })"
            :rotateAroundControls="true"
            @render="onRender"/>
    </div>
</template>