From ae822aec5e1f8dd499c02251585084de205eebe7 Mon Sep 17 00:00:00 2001 From: Alex Barkell Date: Mon, 9 Aug 2021 15:23:08 +0000 Subject: [PATCH] remove float value to use an int as current number --- src/components/Slides/SlideViewer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Slides/SlideViewer.js b/src/components/Slides/SlideViewer.js index 3afadf2..a28ed1d 100755 --- a/src/components/Slides/SlideViewer.js +++ b/src/components/Slides/SlideViewer.js @@ -152,18 +152,19 @@ class SlideViewer extends Component { }) } let currentLetter = ''; - + let currentNumber = 0; for (let yy = 0; yy < (height); yy += vertical) { currentLetter = await this.getNextLetterInAlphabet(''); for (let i = 0; i < (width); i += vertical) { - overlayLabel.push(`${currentLetter + Math.ceil((yy / vertical))}`) + overlayLabel.push(`${currentLetter + currentNumber}`) overlay.push({ - id: `labelOverlay-${currentLetter + Math.ceil((yy / vertical))}-${labelSetId}`, + id: `labelOverlay-${currentLetter + currentNumber}-${labelSetId}`, px: 0 + (i / vertical * vertical + lineThickness), py: 0 + (yy / horizontal * horizontal + lineThickness), }) currentLetter = await this.getNextLetterInAlphabet(currentLetter); } + currentNumber += 1; } } else {