From c0487b4a4994496615a603f44026472310c32263 Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Thu, 9 Apr 2020 15:49:52 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A9=F0=9F=98=BD=20Checkpoint=20./publi?= =?UTF-8?q?c/style.css:530995/181=20./views/room.handlebars:530995/703=20.?= =?UTF-8?q?/room.js:530995/49?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/style.css | 8 +++++--- room.js | 2 +- views/room.handlebars | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/public/style.css b/public/style.css index 9661b5a..bc35ad7 100644 --- a/public/style.css +++ b/public/style.css @@ -56,8 +56,8 @@ footer { } #buzzer { - width: 500px; - height: 500px; + width: 95vw; + height: 95vw; margin: 0 auto; border-radius: 500px; background: red; @@ -78,6 +78,7 @@ h2 img { figure.participant { display: inline-block; + transition: ease-in all .2s; } figure.participant img { @@ -89,5 +90,6 @@ figure.participant figcaption { } .buzzed { - background: limegreen; + background: yellow; + transform: scale(1.3); } \ No newline at end of file diff --git a/room.js b/room.js index 26bff3f..ce9046d 100644 --- a/room.js +++ b/room.js @@ -50,7 +50,7 @@ function addAudienceWS(roomId, ws) { function buzz(roomId, participant) { let room = getOrCreateRoom(roomId); room.participants.forEach(p => { - if (p.ws) { + if (p.ws && p.participantId !== participant.participantId) { p.ws.send(JSON.stringify({ type: "buzz", participant: participant.participantName diff --git a/views/room.handlebars b/views/room.handlebars index dcb3740..5fa9991 100644 --- a/views/room.handlebars +++ b/views/room.handlebars @@ -47,7 +47,7 @@ alert(`[error] ${error.message}`); }; - document.getElementById('buzzer').addEventListener('click', function() { + document.getElementById('buzzer').addEventListener('touchstart', function() { socket.send(JSON.stringify({ type: "buzz" }));