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 25, 2021
1 parent f7666e1 commit eb941cb
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 eb941cb

Please sign in to comment.