From 256853f79b4d15370540950c3e2041c961ab5d1e Mon Sep 17 00:00:00 2001 From: Liv Date: Wed, 26 Jul 2017 13:28:52 -0700 Subject: [PATCH] syntax and clarification on magic number 2 as half height --- scripts/system/chat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/chat.js b/scripts/system/chat.js index 65c7567b30..85de9fd0ac 100644 --- a/scripts/system/chat.js +++ b/scripts/system/chat.js @@ -650,7 +650,7 @@ var width = textSize.width + fudge; var height = speechBubbleLineHeight + fudge; - if(textSize.width >= SPEECH_BUBBLE_MAX_WIDTH) { + if (textSize.width >= SPEECH_BUBBLE_MAX_WIDTH) { var numLines = Math.ceil(width); height = speechBubbleLineHeight * numLines + fudge; width = SPEECH_BUBBLE_MAX_WIDTH; @@ -681,7 +681,7 @@ Vec3.sum( headPosition, rotatedOffset); - position.y += height / 2; // offset based on wrapped height of bubble + position.y += height / 2; // offset based on half of bubble height speechBubbleParams.position = position; if (!speechBubbleTextID) {