Update app.js - Remove unnecessary variable

master
stweedo 2023-06-04 02:17:10 -05:00 committed by GitHub
parent 3871197554
commit e480f21b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -315,11 +315,10 @@ function calculateValue(calculatedVariable, variableValues) {
let valueY = titleY + g.getFontHeight(); // Draw below the title
// Calculate the font size for value dynamically
let valueFontSize = fontSize; // Initialize with maximum possible font size
g.setFontVector(valueFontSize);
g.setFontVector(fontSize);
while (g.stringWidth(resultValue) > g.getWidth() - 10) {
valueFontSize--; // Reduce the font size by 1
g.setFontVector(valueFontSize);
fontSize--; // Reduce the font size by 1
g.setFontVector(fontSize);
}
valueY += g.getFontHeight() / 2 + 2;