bugfix: missing badges for some small nodes

- now use NO_TITLE instead of height.
This commit is contained in:
Dr.Lt.Data
2023-09-19 21:31:46 +09:00
parent 604a5d7574
commit 1c1139a430
4 changed files with 14 additions and 4 deletions

View File

@@ -2002,7 +2002,7 @@ app.registerExtension({
nodeType.prototype.onDrawForeground = function (ctx) {
const r = onDrawForeground?.apply?.(this, arguments);
if(!this.flags.collapsed && badge_mode != 'none' && this.size[1] > LiteGraph.NODE_TITLE_HEIGHT) {
if(!this.flags.collapsed && badge_mode != 'none' && nodeType.title_mode != LiteGraph.NO_TITLE) {
let text = "";
if(badge_mode == 'id_nick')
text = `#${this.id} `;