mouseover
This commit is contained in:
parent
2c14cfc494
commit
f850a8806b
@ -35,7 +35,7 @@ class ConstructAvatar extends Component {
|
|||||||
class="avatar"
|
class="avatar"
|
||||||
id={construct.id}
|
id={construct.id}
|
||||||
onMouseDown={this.onClick.bind(this)}
|
onMouseDown={this.onClick.bind(this)}
|
||||||
onMouseOver={mouseOver ? mouseOver : null}
|
onMouseOver={mouseOver}
|
||||||
style={{ 'background-image': `url(/imgs/${construct.img}.svg)` }}>
|
style={{ 'background-image': `url(/imgs/${construct.img}.svg)` }}>
|
||||||
<ConstructAnimation construct={construct} />
|
<ConstructAnimation construct={construct} />
|
||||||
</div>
|
</div>
|
||||||
@ -86,11 +86,12 @@ class ConstructAvatar extends Component {
|
|||||||
|
|
||||||
|
|
||||||
shouldComponentUpdate(newProps) {
|
shouldComponentUpdate(newProps) {
|
||||||
const { animSource, animTarget, animText, construct } = newProps;
|
const { animSource, animTarget, animText, construct, mouseOver } = newProps;
|
||||||
if (animSource !== this.props.animSource) return true;
|
if (animSource !== this.props.animSource) return true;
|
||||||
if (animTarget !== this.props.animTarget) return true;
|
if (animTarget !== this.props.animTarget) return true;
|
||||||
if (animText !== this.props.animText) return true;
|
if (animText !== this.props.animText) return true;
|
||||||
if (construct !== this.props.construct) return true;
|
if (construct !== this.props.construct) return true;
|
||||||
|
if (mouseOver !== this.props.mouseOver) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user