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

export default {
    components: { Moveable },
    data() {
        return {};
    },
    methods: {
        onScaleStart(e) {
            e.setRatio(1);
        },
        onScale(e) {
            e.target.style.cssText += e.cssText;
        }
    }
};
</script>
<template>
    <div class="container">
        <div
            class="target"
            style="transform: scale(1, 0);"
        >Target1</div>
        <Moveable
            :target="'.target'"
            :scalable="true"
            :keepRatio="true"
            @scaleStart="onScaleStart"
            @scale="onScale"/>
    </div>
</template>