Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
9587ea90
Unverified
Commit
9587ea90
authored
Apr 15, 2023
by
Jake D
Committed by
GitHub
Apr 15, 2023
Browse files
Create noteNode.js
parent
6c35ea50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
web/extensions/core/noteNode.js
web/extensions/core/noteNode.js
+38
-0
No files found.
web/extensions/core/noteNode.js
0 → 100644
View file @
9587ea90
import
{
app
}
from
"
../../scripts/app.js
"
;
import
{
ComfyWidgets
}
from
"
../../scripts/widgets.js
"
;
// Node that add notes to your project
app
.
registerExtension
({
name
:
"
Comfy.NoteNode
"
,
registerCustomNodes
()
{
class
NoteNode
{
color
=
LGraphCanvas
.
node_colors
.
yellow
.
color
;
bgcolor
=
LGraphCanvas
.
node_colors
.
yellow
.
bgcolor
;
groupcolor
=
LGraphCanvas
.
node_colors
.
yellow
.
groupcolor
;
constructor
()
{
if
(
!
this
.
properties
)
{
this
.
properties
=
{};
}
ComfyWidgets
.
STRING
(
this
,
""
,
[
""
,
{
multiline
:
true
}],
app
)
// This node is purely frontend and does not impact the resulting prompt so should not be serialized
this
.
isVirtualNode
=
true
;
}
}
// Load default visibility
LiteGraph
.
registerNodeType
(
"
Note
"
,
Object
.
assign
(
NoteNode
,
{
title_mode
:
LiteGraph
.
NORMAL_TITLE
,
title
:
"
Note
"
,
collapsable
:
true
,
})
);
NoteNode
.
category
=
"
utils
"
;
},
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment