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

export default {
    components: { Moveable },
    data() {
        return {};
    },
    methods: {
        onRenderGroup(e) {
            e.events.forEach(ev => {
                ev.target.style.cssText += ev.cssText;
            });
        }
    }
};
</script>
<template>
    <div class="root">
        <div class="container">
            <div
                class="target target1"
                style="border-radius: 10px;"
            >Target1</div>
            <div class="target target2">Target2</div>
            <div class="target target3">Target3</div>
            <Moveable
                :target="'.target'"
                :draggable="true"
                :resizable="true"
                :rotatable="true"
                :padding="({ left: 10, top: 10, right: 10, bottom: 10 })"
                @renderGroup="onRenderGroup"/>
        </div>
    </div>
</template>