diff --git a/src/assets/cards.css b/src/assets/cards.css index bb47e67..4353690 100644 --- a/src/assets/cards.css +++ b/src/assets/cards.css @@ -10,6 +10,34 @@ /* card itself ********************************************************************/ +.playingCards.unselectable { + pointer-events: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.playingCards { + visibility: visible; + transform: translateY(0); + transition: visibility 0s, opacity 0.2s, transform 0.3s; + opacity: 1; +} + +.playingCards.fade-in { + visibility: hidden; + transform: translateY(-10px); + /*transition: visibility 0.1s, opacity 0.05s;*/ + opacity: 0; +} + +.playingCards.fade-out { + visibility: hidden; + transform: translateY(0); + transition: visibility 0.1s, opacity 0.05s; + opacity: 0; +} + .playingCards .card { display: inline-block; width: 3.3em; diff --git a/src/assets/gameview.scss b/src/assets/gameview.scss index b0180d4..4f5738a 100644 --- a/src/assets/gameview.scss +++ b/src/assets/gameview.scss @@ -47,26 +47,17 @@ text-align: center; } .playing { - -webkit-transition: background-color 250ms ease; - -ms-transition: background-color 250ms ease; - transition: background-color 250ms ease; + -webkit-transition: background-color 0.3s ease; + -ms-transition: background-color 0.3s ease; + transition: background-color 0.3s ease; display: table-cell; height: 152px; vertical-align: middle; - .playingCards { - visibility: visible; - transition: visibility 0s, opacity 0.5s; - opacity: 1; - } - .playingCards.hide { - visibility: hidden; - transition: visibility 0.1s, opacity 0.05s; - opacity: 0; - pointer-events:none; - } - .playingCards > ul.hand { + + .playingCards ul.hand { margin-bottom: 0; } + .probability-move { font-size: 10px; width: 100%; diff --git a/src/components/GameBoard/DoudizhuGameBoard.js b/src/components/GameBoard/DoudizhuGameBoard.js index 6d7664c..743176b 100644 --- a/src/components/GameBoard/DoudizhuGameBoard.js +++ b/src/components/GameBoard/DoudizhuGameBoard.js @@ -9,12 +9,12 @@ class DoudizhuGameBoard extends React.Component { } - computeSingleLineHand(cards) { + computeSingleLineHand(cards, fadeClassName="") { if(cards === "P"){ return