1

I want to get the vertical offset of a SVG path in pixels. I played with getBoundClientRect() and getBBox(), but these return too high values. Is there any way to do something like offset().top for a normal jQuery element?

Brief example: https://jsfiddle.net/aq13swsr/2/

I want the amount of pixels between the top black line and the top red line.

Guite
  • 203
  • 1
  • 2
  • 11

1 Answers1

0

I managed to solve this problem by properly resetting some margins (which are dynamically set using jQuery) before recalculating the next iteration.

Guite
  • 203
  • 1
  • 2
  • 11