-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
通过点击一个按钮手动添加节点时,若节点角度为90度,节点在画布出现的位置不对 #1906
Comments
x6 的坐标是节点左上角的坐标,而不是中心点坐标,你的计算方式有问题。 |
我用的就是节点左上角的坐标呀 |
@Trojanpa 我理解可以通过中心点来计算,不管怎么旋转,中心点坐标是不变的。 |
不对,不是坐标的问题,坐标是对的,是渲染的位置不对。注意下图看左边两个节点的坐标,它们的x坐标是一样的,都是100,但两个节点左侧位置并不对齐。正常情况下,x相等的话是左侧对齐的,像下图右面那样。 |
@Trojanpa 左上角坐标已经不是 x 坐标了呀。 |
意思是旋转后节点的坐标不再是左上角了?感觉有点乱 |
我也遇到这个问题了,旋转后,左上角的坐标是不会转换的,依然是旋转前的坐标 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
问题描述
在一个角度为90度的节点的 上/下/左/右 方向通过按钮添加节点时,添加后的节点出现在画布中的的位置不对,添加的这个节点的坐标是对的,但与其他相同x或相同y坐标的节点位置不对。(其他角度我没有试过,不排除可能也存在这个问题)
重现链接
https://codesandbox.io/s/xuan-zhuan-hou-tian-jia-jie-dian-de-bug-j9is51?file=/src/App.vue
重现步骤
选中一个旋转90度的节点,点击 “在节点上/下/左/右方添加节点” 按钮,观察添加后的节点位置,对比计算基准节点和添加后的节点的坐标信息。
预期行为
期望修复添加节点后出现在画布中的位置能够准确。
平台
屏幕截图或视频(可选)
注意观察:x坐标相同,节点所处画布位置不同,y.....
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: