From 6369f2ab8febc473a772d9ae4b795ef4a2b2c61f Mon Sep 17 00:00:00 2001 From: uecasm Date: Thu, 14 Nov 2013 23:59:56 +1300 Subject: [PATCH] Add option to disable card animation --- WebContent/cah.css | 13 +++++++++++++ WebContent/game.jsp | 1 + WebContent/js/cah.game.js | 2 ++ 3 files changed, 16 insertions(+) diff --git a/WebContent/cah.css b/WebContent/cah.css index 1319501..5fba17b 100644 --- a/WebContent/cah.css +++ b/WebContent/cah.css @@ -579,6 +579,19 @@ span.debug, span.admin { font-weight:700; } +.checkbox { + margin-right: 4px; + white-space: nowrap; +} + +.checkbox input { + vertical-align: middle; +} + +.checkbox span { + vertical-align: middle; +} + .nowrap { white-space: nowrap; } diff --git a/WebContent/game.jsp b/WebContent/game.jsp index f09c163..d7e081a 100644 --- a/WebContent/game.jsp +++ b/WebContent/game.jsp @@ -262,6 +262,7 @@ HttpSession hSession = request.getSession(true); +
Waiting for server...
diff --git a/WebContent/js/cah.game.js b/WebContent/js/cah.game.js index ccc70b2..148c815 100644 --- a/WebContent/js/cah.game.js +++ b/WebContent/js/cah.game.js @@ -534,6 +534,7 @@ cah.Game.prototype.addRoundWhiteCard_ = function(cards) { * @private */ cah.Game.prototype.handCardMouseEnter_ = function(e) { + if (!$(".game_animate_cards", this.element_).attr("checked")) return; $(e.data.card.getElement()).css("z-index", "2").animate({ scale : this.handCardLargeScale_, width : this.handCardLargeSize_, @@ -567,6 +568,7 @@ cah.Game.prototype.handCardMouseLeave_ = function(e) { * @private */ cah.Game.prototype.roundCardMouseEnter_ = function(e) { + if (!$(".game_animate_cards", this.element_).attr("checked")) return; $(e.data.card.getElement()).css("z-index", "201").animate({ scale : this.roundCardLargeScale_, width : this.roundCardLargeSize_,