antvis/G6

The issue has been closed
[V5] 坐标转换 getPointByClient过时; #5487
BalsamPearTaste posted onGitHub
问题描述
请问有替换的坐标转换了吗?
或者目前有什么办法吗进行转换吗?
const addItemNode = (item: any, event: DragEvent) => {
// console.log("添加节点", item, event)
// 将屏幕/页面坐标转换为渲染坐标
// const point = graph.getPointByClient(event.x, event.y)
重现链接
无
重现步骤
在4.8可以使用getPointByClient基于拖拽的位置转换。然后更新5.0之后提示这个方法过时找不到。
预期行为
可以进行坐标转换。
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [5.0.0-beta.28 ... ]
屏幕截图或视频(可选)
https://github.com/antvis/G6/assets/38688241/0f3d7bd7-e3bf-4fd3-b97c-80c7b891718c
补充说明(可选)
No response