Skip to content

Commit

Permalink
Fix #2406 - tooltip positioning issue with SVG target (#2407)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondcao-everlaw authored Nov 11, 2021
1 parent e983b48 commit 2572d96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/utils/DomHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class DomHandler {

static getOuterWidth(el, margin) {
if (el) {
let width = el.offsetWidth;
let width = el.offsetWidth ?? el.getBoundingClientRect().width;

if (margin) {
let style = getComputedStyle(el);
Expand All @@ -48,7 +48,7 @@ export default class DomHandler {

static getOuterHeight(el, margin) {
if (el) {
let height = el.offsetHeight;
let height = el.offsetHeight ?? el.getBoundingClientRect().height;

if (margin) {
let style = getComputedStyle(el);
Expand Down

0 comments on commit 2572d96

Please sign in to comment.