开发者

How to get the relative position of a point in a svg element?

I'm creating a web application where is a svg element. In my Javascript code, I stored the svg container in a variable named "mySVG".

How can I get the pointer relative position to the svg element, I mean, X and Y position relative to the Top-Left corner of the svg element, using Javascript so I could display this data on screen while the user performs an action lik开发者_开发知识库e click over a specific point in the svg container?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜