-
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
怎么让连接桩的位置随自定义节点的宽高自动变化 #4525
Comments
👋 @QDmqf Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. |
|
可以试试坐标用百分比 |
|
感谢 |
还需要考虑旋转的情况 // 计算点击位置相对于节点左上角的偏移 // 将角度转换为弧度 // 计算旋转中心,节点的中心 // 平移点击位置,使其相对于旋转中心 // 进行逆旋转变换 // 平移回相对于节点左上角的位置 console.log('nodePosition') node.addPort({ |
问题描述
在vue中使用自定义节点,然后通过配置创建了连接桩,但是节点的宽高在会伴随输入的内容自动变化,导致连接桩错位
重现链接
怎么让连接桩的位置随自定义节点的宽高自动变化
重现步骤
创建自定义节点,配置连接桩,动态修改节点的宽高
预期行为
连接桩的位置随节点的宽高自动变化
平台
屏幕截图或视频(可选)
2024-12-11.17.13.58.mov
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: