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

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