From: Jason Woofenden Date: Tue, 1 Nov 2011 02:25:45 +0000 (-0400) Subject: mousover temporarily brings card to front X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-cgt.git;a=commitdiff_plain;h=4c75fd3542bb59bc6ece0f46f4ec7b19b16085bf mousover temporarily brings card to front --- diff --git a/client.coffee b/client.coffee index a773c5d..255d455 100644 --- a/client.coffee +++ b/client.coffee @@ -61,9 +61,11 @@ instantiate_card = (card) -> if card.flipped view.addClass 'flipped' $table.append view - view.draggable stack: '.card' + view.draggable containment: '#table' + view.bind 'dragstart', (event, ui) -> + view.css 'z-index': card.z = next_card_z() view.bind 'dragstop', (event, ui) -> - top_card_z = parseInt view.css 'z-index' + #view.css 'z-index': card.z p = view.position() state.move state.agent, card.number, transform_x(p.left), transform_y(p.top) card.view = view diff --git a/style.less b/style.less index 610023f..c613024 100644 --- a/style.less +++ b/style.less @@ -58,6 +58,9 @@ h1 { .shadow(1px, 1px, 8px, 0.4); border-radius: 4px; + &:hover { + z-index: 9999 !important; + } .button { display: none; border: 1px solid #aaa;