From cd7e0eccb25d5621a456ca094f1c5cd262a11350 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 5 May 2018 14:47:20 +0200 Subject: [PATCH] Text in Bubbles improved --- .vs/AAWeb/v15/.suo | Bin 69632 -> 69632 bytes FloatingSpace/Bubble.js | 28 ++++++++++++++++++++++------ server.js | 2 +- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.vs/AAWeb/v15/.suo b/.vs/AAWeb/v15/.suo index 1b79158db7352bd5bf23a7155e17fe684f6da56d..5417763eeb2d063ec306c6a6d47864efd1f98bef 100644 GIT binary patch delta 383 zcmZozz|ydQWkU`V>x7N(pXY8aWctm_Dj=BIlDD~#ja`6IXLF_4e_KY~&6OeThLb21A{P7 zgq;Cy!Q>5d1STg;WZ!&XjsxH1#&*xi0jmus2TW{Rv_=BeT}SRRBHT6Et9$RF6CBK` zNimb}cbjasyKsnk(j@jpSC|;>fiBUX{C+jZ$m?k&O@SePWg23ck zM>RIrOsHjEG=*id?PRIV!Vk7FiU~0wzlg{ eMs(jyRxGobeD1#3 0.9) { - let startingPosition = { - x: pFloatingObject.currentPosition.x, - y: pFloatingObject.currentPosition.y - TOTAL_ROWS / 2 * (fontSize * 0.60 + 10) - }; - let rawLabelArray = label.split(" "); let labelArray = []; @@ -247,7 +242,9 @@ function newBubble() { } } - /* Now we plot each row. */ + /* Calculate each ROW */ + + let labelRows = []; for (let i = 0; i < TOTAL_ROWS; i++) { @@ -263,6 +260,25 @@ function newBubble() { } } + if (labelRow !== "") { + + labelRows.push(labelRow); + + } + + } + + /* Now we plot each row. */ + + for (let i = 0; i < labelRows.length; i++) { + + let labelRow = labelRows[i]; + + let startingPosition = { + x: pFloatingObject.currentPosition.x, + y: pFloatingObject.currentPosition.y - labelRows.length / 2 * (fontSize * 0.60 + 10) + }; + labelPoint = { x: startingPosition.x - labelRow.length / 2 * fontSize * 0.60, y: startingPosition.y + (i + 1) * (fontSize * 0.60 + 10) diff --git a/server.js b/server.js index f4b180fca..626140bfd 100644 --- a/server.js +++ b/server.js @@ -6,7 +6,7 @@ if (CONSOLE_LOG === true) { } -const DEBUG_MODE = false; // This forces the server to read Plotters from the local drive. +const DEBUG_MODE = true; // This forces the server to read Plotters from the local drive. if (CONSOLE_LOG === true && DEBUG_MODE === true) {