targeting text
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user