Skip to content

Commit

Permalink
fix(util): properly assign helper-svg styles
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku authored and fake-join[bot] committed Jul 11, 2022
1 parent da64b2a commit 911909b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lib/util/Text.js
Expand Up @@ -12,6 +12,10 @@ import {
remove as svgRemove
} from 'tiny-svg';

import {
assignStyle
} from 'min-dom';

var DEFAULT_BOX_PADDING = 0;

var DEFAULT_LABEL_SIZE = {
Expand Down Expand Up @@ -194,11 +198,14 @@ function getHelperSvg() {
helperSvg = svgCreate('svg');

svgAttr(helperSvg, {
id: 'helper-svg',
width: 0,
height: 0,
id: 'helper-svg'
});

assignStyle(helperSvg, {
visibility: 'hidden',
position: 'fixed'
position: 'fixed',
width: 0,
height: 0
});

document.body.appendChild(helperSvg);
Expand Down

0 comments on commit 911909b

Please sign in to comment.