x和y绑定之后无法实现响应

This issue has been tracked since 2021-11-22.

:x="x" :y="y"
这样绑定之后,修改x和y会出现各种找不到规律的问题。一般是修改y没有反应,或者修改x的时候会出现乱套,我明明改x=720,打log看了,但实际上得到的坐标却是1536,有时候改y又有反应了…………总之很乱,根本找不出个问题的规律。这是什么情况?

coollofty wrote this answer on 2021-11-22

`setxy 0 0
setxy 720 0
FileViewer.vue?7b0f:128 {left: 720, top: 0, width: 680, height: 800}
FileViewer.vue?7b0f:128 {left: 720, top: 0, width: 680, height: 800}

setxy 0 0
setxy 0 840
FileViewer.vue?7b0f:128 {left: 0, top: 0, width: 680, height: 800}
FileViewer.vue?7b0f:128 {left: 0, top: 0, width: 680, height: 800}`

以上Log是我创建了两个drag resize组件,然后在旁边放一个按钮,点击按钮之后修改组件的x和y,组件那边响应resizing和dragging事件之后得打出来的Log。可以感受一下…………

iazrael wrote this answer on 2021-12-16

我也遇到这个问题了,修改x,y和w,h之后,会导致触发draging事件,然而这个事件的处理逻辑中,会读取鼠标位置,因为你鼠标不在容器中,它拿到的就是NaN。。。结果就乱来了
image

More Details About Repo
Owner Name kirillmurashov
Repo Name vue-drag-resize
Full Name kirillmurashov/vue-drag-resize
Language JavaScript
Created Date 2018-04-26
Updated Date 2022-11-25
Star Count 1764
Watcher Count 24
Fork Count 291
Issue Count 89

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date