Skip to content

Commit

Permalink
Merge pull request #69 from KPMP/KPMP-2970_remove_float_for_currentNu…
Browse files Browse the repository at this point in the history
…mber

remove float value to use an int as current number
  • Loading branch information
rlreamy authored Aug 9, 2021
2 parents ce5276d + ae822ae commit 10c43db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/Slides/SlideViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 10c43db

Please sign in to comment.