Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shape每一条边的middle point 拉伸时产生偏移问题 #26

Closed
justJokee opened this issue Jul 6, 2021 · 3 comments
Closed

shape每一条边的middle point 拉伸时产生偏移问题 #26

justJokee opened this issue Jul 6, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@justJokee
Copy link
Contributor

初始化如下图:

23632A9AB3B0BA1DF0FB38BCD083078F

元素top初始值是175,如图所示bottom拖拽一下,按理来说top值应该始终为175不变,但是有时候会产生正负几个像素的偏差(如果一次没出现,就让元素失焦再选中,重复几次),经测试其它点均有此问题

9C421EB84CA339ED4682AA3EE5975673

这样就会给人呈现元素突然位移抖一下的现象,是否各种矩阵计算导致了center值或者height值出现了偏差?

justJokee added a commit to justJokee/visual-drag-demo that referenced this issue Jul 6, 2021
@justJokee
Copy link
Contributor Author

晚上看了一下,是因为shape上的point点也是有尺寸的,直接用鼠标位置计算被拖动元素的点的position是不准确的,因为此时鼠标可能位于point点的任意位置,因此要计算差值,以确保点位于元素自身上,已提交pr

@HarryLee-CN
Copy link

嚯,非常细节,我试了一下确实可以复现

@woai3c
Copy link
Owner

woai3c commented Jul 11, 2021

#27

@woai3c woai3c closed this as completed Jul 11, 2021
@woai3c woai3c added the bug Something isn't working label Aug 31, 2022
leoyongyuan pushed a commit to leoyongyuan/visual-drag-demo that referenced this issue Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants