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

export default {
    components: { Moveable },
    data() {
        return {};
    },
    methods: {
        individualGroupableProps(element) {
            if (element.classList.contains("target2")) {
                return { resizable: false };
            }
        },
        onRender(e) {
            e.target.style.cssText += e.cssText;
        }
    }
};
</script>
<template>
    <div class="root">
        <div class="container">
            <div class="target target1">Target1</div>
            <div class="target target2">Target2</div>
            <div class="target target3">Target3</div>
            <Moveable
                :target="'.target'"
                :individualGroupable="true"
                :draggable="true"
                :resizable="true"
                :rotatable="true"
                :individualGroupableProps="individualGroupableProps"
                @render="onRender"/>
        </div>
    </div>
</template>