Update app.js

master
RKBoss6 2025-06-29 17:04:11 -04:00 committed by GitHub
parent c1a0f0f379
commit fa4a568fe9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -10,15 +10,15 @@ Graphics.prototype.setFontBold = function(scale) {
// we also define functions using 'let fn = function() {..}' for the same reason. function decls are global
let drawTimeout;
let calcStrLength=function(str,maxLength){
let calcStrLength=function(str,limitLength){
//too long
// Example maximum length
var truncatedText = str;
if (str.length > maxLength) {
truncatedText = str.substring(0, maxLength - 3) + "...";
if (str.length > limitLength) {
truncatedText = str.substring(0, limitLength - 3) + "...";
}
return truncatedText;