diff options
-rw-r--r-- | src/Home.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Home.js b/src/Home.js index 1695ed4..9ba6c0b 100644 --- a/src/Home.js +++ b/src/Home.js @@ -66,10 +66,12 @@ class Home extends Component { } handeMouseMove(e) { - let traX = (4 * e.pageX) / 480; - let traY = (4 * e.pageY) / 250; - document.getElementById("baiLogo").style.backgroundPosition = - traX + "%" + traY + "%"; + if (this.state.isLoaded) { + let traX = (4 * e.pageX) / 480; + let traY = (4 * e.pageY) / 250; + document.getElementById("baiLogo").style.backgroundPosition = + traX + "%" + traY + "%"; + } } componentWillUnmount() { |