mauricius / vue-draggable-resizable

Vue3 Component for draggable and resizable elements.
https://mauricius.github.io/vue-draggable-resizable/
MIT License
3.34k stars 560 forks source link

recalculate actual width and height,when slot content size change,props w/h was set to 'auto' #315

Open Linyan-ma opened 3 years ago

Linyan-ma commented 3 years ago

report: BUG

as shown below,i set w/h auto,and parent true,then change slot component's width,drag the component,it's boundary is not right,cuz the vue-draggable-resizable inner width and height not recalculate

<vue-draggable-resizable
        :x="ele.bkStyle.x"
        :y="ele.bkStyle.y"
        :z="ele.zIndex"
        w="auto"
        h="auto"
        :min-width="10"
        :min-height="10"
        :parent="true"
      >
<component />
</vue-draggable-resizable>