5
I have an SVG that contains, among other items, an element <circle>
.
I can manipulate it via Javascript by changing CSS properties such as visibility
, but I can’t get his position on the screen.
My idea is that when the mouse passes over certain <div>
, another <div>
is displayed based on the position of the <circle>
.
I tried to use the offsetTop
, but it didn’t work.
Thus, to know the distance of < Circle > to the top of the screen I would have to take the coordinate "Cy" and then add with the coordinate of < svg > ?
– Dionei Fábio Serino
Exactly, Dionei.
– bfavaretto
Referring to Dionei’s question, in the comments, not exactly, because it depends on the proportion and scale of the SVG.
– Daniel Omine
Well, anyway it’s already a way... I’ll work on it to solve my problem. Thanks for the help.
– Dionei Fábio Serino