From f66a4d56ac2c04e2611e949c6c9454d38061ba9c Mon Sep 17 00:00:00 2001 From: AsbjornOlling Date: Wed, 17 Aug 2022 15:32:50 +0200 Subject: [PATCH] slightly prettier chat bubbles --- chatapp.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatapp.svg b/chatapp.svg index 4f25ba5..405b857 100644 --- a/chatapp.svg +++ b/chatapp.svg @@ -22,7 +22,7 @@ const svgns = "http://www.w3.org/2000/svg"; const width = 300; const height = 500; -const line_height = 5; +const line_height = 6; const max_visible_lines = 10; const messages_y_offset = 20; const typing_speed = 70; @@ -98,7 +98,7 @@ function ChatMessage(message_text, is_myself) { container.appendChild(text); // make chat bubble - const padding = 7; + const padding = 6; const textbox = text.getBBox(); const y_percent = Math.round(((textbox.y - padding) / height) * 100); const bubble = document.createElementNS(svgns, 'rect');