Fix truncating non-strings (#74)

This commit is contained in:
bymyself
2024-08-17 20:01:25 -07:00
committed by GitHub
parent 182e934e47
commit effa21653a

View File

@@ -9937,6 +9937,7 @@ LGraphNode.prototype.executeAction = function(action)
if (availableWidth <= ellipsisWidth) {
v = "\u2024"; // One dot leader
} else {
v = `${v}`
const overflowWidth = (textWidth + ellipsisWidth) - availableWidth;
// Only first 3 characters need to be measured precisely
if ( overflowWidth + charWidthAvg * 3 > availableWidth) {