optimized fade in effect
This commit is contained in:
parent
7f1310f192
commit
6e101bea02
|
@ -19,15 +19,19 @@
|
|||
|
||||
.playingCards {
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
transform: translateY(0) scale(1);
|
||||
transition: visibility 0s, opacity 0.2s, transform 0.3s;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.playingCards.scale-fade-in {
|
||||
visibility: hidden;
|
||||
transform: translateY(-10px) scale(1.2);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.playingCards.fade-in {
|
||||
visibility: hidden;
|
||||
transform: translateY(-10px);
|
||||
/*transition: visibility 0.1s, opacity 0.05s;*/
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,9 +89,9 @@ class DoudizhuGameBoard extends React.Component {
|
|||
|
||||
let fadeClassName = "";
|
||||
if(this.props.toggleFade === "fade-out" && (playerIdx+2)%3 === this.props.currentPlayer)
|
||||
fadeClassName = this.props.toggleFade;
|
||||
fadeClassName = "fade-out";
|
||||
else if(this.props.toggleFade === "fade-in" && (playerIdx+1)%3 === this.props.currentPlayer)
|
||||
fadeClassName = this.props.toggleFade;
|
||||
fadeClassName = "scale-fade-in";
|
||||
return this.computeSingleLineHand(this.props.latestAction[playerIdx], fadeClassName)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue