Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这个问题很简单,但我自己解决不了。如何获取子元素的全局坐标?在我的情况下,我有一个组和几个嵌套组。然后我需要获取一些我已经移动和旋转过的东西的内部元素的坐标。我试图获取感兴趣对象的本地位置,然后应用全局变换,但结果与我预期的不一样。
编辑 这是我所拥有的和需要的东西的一个小演示。我们有几个嵌套组,我们对其应用了一些转换。然后我需要说CIRCLE#target' 中心相对于 SVG 的坐标。如您所见,它将类似于 77x131。
CIRCLE#target