Skip to content

Commit

Permalink
make svg ignore pointer events in getTextDimension (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw authored and zhaoyongjie committed Nov 24, 2021
1 parent 1bcd292 commit 826e741
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default function getTextDimension(
const svg = document.createElementNS(SVG_NS, 'svg');
svg.style.position = 'absolute'; // so it won't disrupt page layout
svg.style.opacity = '0'; // and not visible
svg.style.pointerEvents = 'none'; // and not capturing mouse events
svg.appendChild(textNode);
container.appendChild(svg);

Expand Down

0 comments on commit 826e741

Please sign in to comment.