Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dom utils): use getBoundingClientRect() to determine element visibility #1203

Merged
merged 1 commit into from Oct 14, 2017

Conversation

tmorehouse
Copy link
Member

Element.offsetParent/offsetHeight/offsetWidth does not work on <svg> elements.

Swtching to Element.getBoundingClientRect().height and .width gets around this limitation

…ibility

`Element.offsetParent`/`offsetHeight`/`offsetWidth` does not work on `<svg>` elements.

Swtching to `Element.getBoundingClientRect().height` and `.width` gets around this limitation
@codecov-io
Copy link

Codecov Report

Merging #1203 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #1203   +/-   ##
=======================================
  Coverage   32.86%   32.86%           
=======================================
  Files         109      109           
  Lines        2866     2866           
  Branches      920      920           
=======================================
  Hits          942      942           
  Misses       1547     1547           
  Partials      377      377
Impacted Files Coverage Δ
lib/utils/dom.js 47.54% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 960877c...4427b10. Read the comment docs.

@tmorehouse tmorehouse merged commit 6e2fff4 into dev Oct 14, 2017
@tmorehouse tmorehouse deleted the dom/visible branch October 24, 2017 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants