@gausszhou/vue-drag-resize-rotate
vue-drag-resize-rotate
简体中文 | English
Tips
Please detour if the elements dragged at the same time reach more than 50+ businesses
Online demo
Getting started
npm install @gausszhou/vue-drag-resize-rotate
<template>
<div class="container">
<vue-drag-resize-rotate
:w="100"
:h="100"
:x="0"
:y="0"
:parent="true"
:draggable="true"
:resizable="true"
:rotatable="true"
@resizing="resizing"
@rotating="rotating"
:r="0"
>
{{ angle }}
</vue-drag-resize-rotate>
</div>
</template>
<script>
import VueDragResizeRotate from "@gausszhou/vue-drag-resize-rotate";
export default {
components: {
VueDragResizeRotate,
},
data() {
return {
angle: 0,
};
},
methods: {
resizing(x, y, w, h) {
console.log(x, y, w, h);
},
rotating(angle) {
console.log(angle)
},
},
};
</script>
Todo list
- Fixed some regular judgment problems and 1px error of container size
- Integrate auto-align function
- Integrate and refactor rotation function
- realizes rotation, can stretch the size when rotating, and does not move to the vertex
- Rotary handle style follows angle changes
- fix aspect ratio
- allow external incoming aspect ratio
- fix zoom
- rebuild code
- Extract logic
- Optimized performance
Tip: After turning on the rotation, the grid alignment and parent container restrictions will be invalid, and there will be Breaking Changes to be refactored! ! !
References
https://github.com/mauricius/vue-draggable-resizable
https://github.com/gorkys/vue-draggable-resizable-gorkys
https://github.com/tmrcui/vue-draggable-resizable-rotatable
Related Packages
@minogin/vue-drag-resize-rotate
Vue component which acts as a draggable, resizable and rotateable container for...
7,341
78
yoyoo-ddr
Lightweight and no dependencies,use draggable, resizable, rotatable, configurabl...
37,527
186
yoyoo-ddr-vue3
Lightweight and no dependencies,use draggable, resizable, rotatable, configurabl...
7,422
186
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 2.0.15 | ^2.6.11 | MIT | |
| 2.0.14 | ^2.6.11 | MIT | |
| 2.0.13 | ^2.6.11 | MIT | |
| 2.0.12 | ^2.6.11 | MIT | |
| 2.0.11 | ^2.6.11 | MIT | |
| 2.0.10 | ^2.6.11 | MIT | |
| 2.0.9 | ^2.6.11 | MIT | |
| 2.0.7 | ^2.6.11 | MIT | |
| 2.0.6 | ^2.6.11 | MIT | |
| 2.0.5 | ^2.6.11 | MIT | |
| 2.0.4 | ^2.6.11 | MIT | |
| 2.0.3 | ^2.6.11 | MIT | |
| 2.0.2 | ^2.6.11 | MIT | |
| 2.0.1 | ^2.6.11 | MIT |