vue-draggable-resizable icon indicating copy to clipboard operation
vue-draggable-resizable copied to clipboard

当横向拖动为负的时候,X值会有一些小问题,希望设置一个最小拖动值参数

Open cc5332 opened this issue 3 years ago • 2 comments

我经X拖动设置了最小值为50,来防止拖动为负的时候显示错位, image 但是当拖动为负的时候,他的translate还是负数, image 于是,我修改了vue-draggable-resizable.vue 中 image 希望作者把这一个最小值设置成一个配置参数,这样方便大家使用。

Finally, thanks for the contribution and pay, thank you!

cc5332 avatar Apr 19 '21 09:04 cc5332

@cc5332 有一个方法,就是在onDrag中判断x<50时return false;这样可以终止这次拖动事件。

onDrag(x) {
    if(x<50) {
        return false;
    }
    // 其它逻辑
}

sumy7 avatar Oct 13 '21 08:10 sumy7

bug1:The value of x is uncontrolled and can still be dragged even if it no longer changes bug2:A parameter should be passed to limit the range of dragging

gdlk888 avatar Jan 26 '24 01:01 gdlk888