<script>
import Moveable from "vue3-moveable";

export default {
    components: { Moveable },
    setup() {
        const onRotateStart = e => {
            e.setFixedDirection([-0.5, -0.5]);
        };
        const onRotate = e => {
            e.target.style.transform = e.drag.transform;
        };
        return { onRotateStart, onRotate };
    }
};
</script>
<template>
    <div class="root">
        <div class="target">Target</div>
        <Moveable
            :target="'.target'"
            :rotatable="true"
            @rotateStart="onRotateStart"
            @rotate="onRotate"/>
    </div>
</template>