targeting text

This commit is contained in:
ntr
2019-09-16 14:22:57 +10:00
parent d4ae38e733
commit d1b13ce092
2 changed files with 10 additions and 10 deletions
+3 -10
View File
@@ -17,8 +17,9 @@ class TargetSvg extends Component {
this.onResize = throttle(() => {
const svg = document.getElementById('targeting');
if (!svg) return setTimeout(this.onResize, 500);
const { width, height } = svg.getBoundingClientRect();
const path = document.querySelector('#targeting path');
// const path = document.querySelector('#targeting path');
this.setState({ width, height });
}, 500);
}
@@ -34,15 +35,7 @@ class TargetSvg extends Component {
if (!animTarget) return false;
return (
<svg id="targeting" viewBox={`0 0 ${width} ${height}`} preserveAspectRatio="none" class="targeting-arrows">
<text
x={`${(width / 2) - 50}`}
y={`${(height / 2) + 16}`}
font-family="Jura"
font-size="2em">
{animTarget.skill}
</text>
</svg>
<h1 class="resolving-skill">{animTarget.skill}</h1>
);
}