fix: hide badge when collapsed

This commit is contained in:
Dr.Lt.Data
2023-08-15 08:20:42 +09:00
parent 5cfa207530
commit 9f561e71f4
2 changed files with 3 additions and 3 deletions

View File

@@ -1558,7 +1558,7 @@ app.registerExtension({
nodeType.prototype.onDrawForeground = function (ctx) {
const r = onDrawForeground?.apply?.(this, arguments);
if(badge_mode != 'none') {
if(!this.flags.collapsed && badge_mode != 'none') {
let text = nicknames[nodeData.name.trim()];
if(text.length > 20) {
text = text.substring(0,17)+"..";
@@ -1596,7 +1596,7 @@ app.registerExtension({
node.onDrawForeground = function (ctx) {
const r = onDrawForeground?.apply?.(this, arguments);
if(badge_mode != 'none') {
if(!this.flags.collapsed && badge_mode != 'none') {
let text = nicknames[node.type.trim()];
if(text.length > 20) {