double click card to flip, remove excessive margin

This commit is contained in:
AlecM33
2022-06-22 18:30:18 -04:00
parent 8395aabc9e
commit b98af2d68c
3 changed files with 43 additions and 21 deletions

View File

@@ -485,12 +485,12 @@ function renderPlayerRole (gameState) {
document.querySelector('#role-description').innerText = gameState.client.gameRoleDescription;
document.getElementById('game-role-back').addEventListener('click', () => {
document.getElementById('game-role-back').addEventListener('dblclick', () => {
document.getElementById('game-role').style.display = 'flex';
document.getElementById('game-role-back').style.display = 'none';
});
document.getElementById('game-role').addEventListener('click', () => {
document.getElementById('game-role').addEventListener('dblclick', () => {
document.getElementById('game-role-back').style.display = 'flex';
document.getElementById('game-role').style.display = 'none';
});

View File

@@ -60,8 +60,8 @@ export const HTMLFragments = {
<p id='role-description'></p>
</div>
<div id='game-role-back'>
<h4>Click to show your role</h4>
<p>(click again to hide)</p>
<h4>Double-tap here to show your role</h4>
<p>(Double-tap here again to hide)</p>
</div>
<div id='game-people-container'>
<label id='players-alive-label'></label>
@@ -138,8 +138,8 @@ export const HTMLFragments = {
<p id='role-description'></p>
</div>
<div id='game-role-back'>
<h4>Click to show your role</h4>
<p>(click again to hide)</p>
<h4>Double-tap here to show your role</h4>
<p>(Double-tap here again to hide)</p>
</div>
<div id='game-people-container'>
<label id='players-alive-label'></label>
@@ -205,7 +205,7 @@ export const HTMLFragments = {
<h2>Roles in this game:</h2>
<div id='game-role-info-container'></div>
<div class='modal-button-container'>
<button id='close-role-info-modal-button' class='app-button'>Close</button>
<button id='close-role-info-modal-button' class='app-button cancel'>Close</button>
</div>
</div>`,
END_OF_GAME_VIEW: