diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx index 112126d8..c39b219c 100644 --- a/client/src/components/construct.jsx +++ b/client/src/components/construct.jsx @@ -35,7 +35,7 @@ class ConstructAvatar extends Component { class="avatar" id={construct.id} onMouseDown={this.onClick.bind(this)} - onMouseOver={mouseOver ? mouseOver : null} + onMouseOver={mouseOver} style={{ 'background-image': `url(/imgs/${construct.img}.svg)` }}> @@ -86,11 +86,12 @@ class ConstructAvatar extends Component { shouldComponentUpdate(newProps) { - const { animSource, animTarget, animText, construct } = newProps; + const { animSource, animTarget, animText, construct, mouseOver } = newProps; if (animSource !== this.props.animSource) return true; if (animTarget !== this.props.animTarget) return true; if (animText !== this.props.animText) return true; if (construct !== this.props.construct) return true; + if (mouseOver !== this.props.mouseOver) return true; return false; } }