X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=client.coffee;h=99a70a74ce68f48f1297078ee92183b06b317bd4;hb=3be596d7cfcd16a09505b8c68cad974d7b2901ac;hp=a773c5dc92fb4278f1e34a311ccc129932ae3b84;hpb=b828a190d7672e89aa84801b66edb0d82076e45d;p=peach-cgt.git diff --git a/client.coffee b/client.coffee index a773c5d..99a70a7 100644 --- a/client.coffee +++ b/client.coffee @@ -61,9 +61,10 @@ instantiate_card = (card) -> if card.flipped view.addClass 'flipped' $table.append view - view.draggable stack: '.card' + view.draggable containment: '#table', grid: [20, 20] + 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' p = view.position() state.move state.agent, card.number, transform_x(p.left), transform_y(p.top) card.view = view