F
F
fierfoxik2016-06-04 20:01:22
JavaScript
fierfoxik, 2016-06-04 20:01:22

Why does .position( ) define coordinates from the start of the page in svg?

I wanted to add automatic positioning of an absolutely hidden block when hovering over a point on the chart to the point itself. Found the .position() method but it outputs the coordinates from the beginning of the page, although the wrapper for the fresh point is position: relative; like the svg itself. What could be the problem?
codepen.io/anon/pen/PzqeRB

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-06-04
@webinar

Both of your blocks are identical, look at the colored back, so the positioning is correct, but the wrapper is not where you need it, apparently codepen.io/anon/pen/ZOGRzO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question