ajanata / PretendYoureXyzzy

A web clone of the card game Cards Against Humanity.
https://pretendyoure.xyz/zy
BSD 2-Clause "Simplified" License
1.23k stars 397 forks source link

Add option to disable card animation #59

Closed uecasm closed 10 years ago

uecasm commented 10 years ago

With certain combinations of browser window sizes and number of players (and the base card size that this produces), the card growing animation that appears on mouseover may result in the last white card in the round bouncing down to the following line (and then bouncing back because now the mouse is no longer over it, and then bouncing back down, etc). This can make it hard for the Czar to select the last card in the round as the winner.

This is not a perfect solution, but it works: a checkbox is added to the top of the screen, allowing any player to temporarily or permanently disable the card resizing animations. The Czar could turn this off just while they're selecting the card, or some players may prefer to leave it off permanently if they just don't like the animation.

(Only the opening animation is disabled, to ensure that the closing animation runs to completion and the card returns to its base size even if the checkbox is toggled while the animation is playing.)