mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-10 07:30:08 +00:00
Apply new code format standard (#217)
This commit is contained in:
@@ -1,53 +1,53 @@
|
||||
import { LiteGraph, LGraphCanvas } from "@comfyorg/litegraph";
|
||||
import { app } from "../../scripts/app";
|
||||
import { ComfyWidgets } from "../../scripts/widgets";
|
||||
import { LiteGraph, LGraphCanvas } from '@comfyorg/litegraph'
|
||||
import { app } from '../../scripts/app'
|
||||
import { ComfyWidgets } from '../../scripts/widgets'
|
||||
// Node that add notes to your project
|
||||
|
||||
app.registerExtension({
|
||||
name: "Comfy.NoteNode",
|
||||
name: 'Comfy.NoteNode',
|
||||
registerCustomNodes() {
|
||||
class NoteNode {
|
||||
static category: string;
|
||||
static category: string
|
||||
|
||||
color = LGraphCanvas.node_colors.yellow.color;
|
||||
bgcolor = LGraphCanvas.node_colors.yellow.bgcolor;
|
||||
groupcolor = LGraphCanvas.node_colors.yellow.groupcolor;
|
||||
properties: { text: string };
|
||||
serialize_widgets: boolean;
|
||||
isVirtualNode: boolean;
|
||||
collapsable: boolean;
|
||||
title_mode: number;
|
||||
color = LGraphCanvas.node_colors.yellow.color
|
||||
bgcolor = LGraphCanvas.node_colors.yellow.bgcolor
|
||||
groupcolor = LGraphCanvas.node_colors.yellow.groupcolor
|
||||
properties: { text: string }
|
||||
serialize_widgets: boolean
|
||||
isVirtualNode: boolean
|
||||
collapsable: boolean
|
||||
title_mode: number
|
||||
|
||||
constructor() {
|
||||
if (!this.properties) {
|
||||
this.properties = { text: "" };
|
||||
this.properties = { text: '' }
|
||||
}
|
||||
ComfyWidgets.STRING(
|
||||
// @ts-ignore
|
||||
// Should we extends LGraphNode?
|
||||
this,
|
||||
"",
|
||||
["", { default: this.properties.text, multiline: true }],
|
||||
'',
|
||||
['', { default: this.properties.text, multiline: true }],
|
||||
app
|
||||
);
|
||||
)
|
||||
|
||||
this.serialize_widgets = true;
|
||||
this.isVirtualNode = true;
|
||||
this.serialize_widgets = true
|
||||
this.isVirtualNode = true
|
||||
}
|
||||
}
|
||||
|
||||
// Load default visibility
|
||||
|
||||
LiteGraph.registerNodeType(
|
||||
"Note",
|
||||
'Note',
|
||||
// @ts-ignore
|
||||
Object.assign(NoteNode, {
|
||||
title_mode: LiteGraph.NORMAL_TITLE,
|
||||
title: "Note",
|
||||
collapsable: true,
|
||||
title: 'Note',
|
||||
collapsable: true
|
||||
})
|
||||
);
|
||||
)
|
||||
|
||||
NoteNode.category = "utils";
|
||||
},
|
||||
});
|
||||
NoteNode.category = 'utils'
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user