Is there a method for getting the client rect for an element relative to the document besides offset? getBoundingClientRect()
gets the value relative to the client's browser.
I'm using D3
and jQuery's height()
nor width()
are working (I've even tried doing it window.load()
), but offset()
is. Neither are javascripts .offset
return [$e.offset().top + $e.height()/2, $e.offset().left + $e.width()/2]
$e.height()
and $e.width()
both return 0
It's an SVG element, I'm just using it to edit my SVG. It's much easier to load/handle SVG's with D3
. The project is not data related, it's just a map.