vue-draggable-resizable
vue-draggable-resizable copied to clipboard
Add positioning option with css top, left
Some components have problems with positioning, if usage css transform. Example I local change this code https://github.com/mauricius/vue-draggable-resizable/blob/e0f1a0ba8467f9d81d9def81db6aae59596dbb99/src/components/vue-draggable-resizable.vue#L781
computed: {
style () {
return {
// transform: `translate(${this.left}px, ${this.top}px)`,
left: this.left + 'px',
top: this.top + 'px',
width: this.computedWidth,
height: this.computedHeight,
zIndex: this.zIndex,
...(this.dragging && this.disableUserSelect ? userSelectNone : userSelectAuto)
}
},
This solved my problem, I propose to implement various ways of positioning
I had the same problem
transform:translateX(${this.left}px) translateY(${this.top}px)
left top 会溢出,上面代码经过测试没问题,可以试试