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

export default {
    components: { Moveable },
    data() {
        return {};
    },
    methods: { onRender(e) {
        e.target.style.cssText += e.cssText;
    } }
};
</script>
<template>
    <div class="container">
        <div
            class="drag-area"
            style="width: 100px;height: 100px;"
        >Drag</div>
        <div class="target"></div>
        <Moveable
            :target="'.target'"
            :draggable="true"
            :scalable="true"
            :rotatable="true"
            :dragTarget="'.drag-area'"
            @render="onRender"/>
    </div>
</template>