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
6565c9ad
Commit
6565c9ad
authored
Jan 31, 2024
by
comfyanonymous
Browse files
Litegraph node search improvements.
See:
https://github.com/comfyanonymous/litegraph.js/pull/5
parent
eeca7248
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
web/lib/litegraph.core.js
web/lib/litegraph.core.js
+13
-2
web/lib/litegraph.css
web/lib/litegraph.css
+13
-0
No files found.
web/lib/litegraph.core.js
View file @
6565c9ad
...
...
@@ -11910,7 +11910,7 @@ LGraphNode.prototype.executeAction = function(action)
var
ctor
=
LiteGraph
.
registered_node_types
[
type
];
if
(
filter
&&
ctor
.
filter
!=
filter
)
return
false
;
if
((
!
options
.
show_all_if_empty
||
str
)
&&
type
.
toLowerCase
().
indexOf
(
str
)
===
-
1
)
if
((
!
options
.
show_all_if_empty
||
str
)
&&
type
.
toLowerCase
().
indexOf
(
str
)
===
-
1
&&
(
!
ctor
.
title
||
ctor
.
title
.
toLowerCase
().
indexOf
(
str
)
===
-
1
)
)
return
false
;
// filter by slot IN, OUT types
...
...
@@ -11964,7 +11964,18 @@ LGraphNode.prototype.executeAction = function(action)
if
(
!
first
)
{
first
=
type
;
}
const
nodeType
=
LiteGraph
.
registered_node_types
[
type
];
if
(
nodeType
?.
title
)
{
help
.
innerText
=
nodeType
?.
title
;
const
typeEl
=
document
.
createElement
(
"
span
"
);
typeEl
.
className
=
"
litegraph lite-search-item-type
"
;
typeEl
.
textContent
=
type
;
help
.
append
(
typeEl
);
}
else
{
help
.
innerText
=
type
;
}
help
.
dataset
[
"
type
"
]
=
escape
(
type
);
help
.
className
=
"
litegraph lite-search-item
"
;
if
(
className
)
{
...
...
web/lib/litegraph.css
View file @
6565c9ad
...
...
@@ -184,6 +184,7 @@
color
:
white
;
padding-left
:
10px
;
margin-right
:
5px
;
max-width
:
300px
;
}
.litegraph.litesearchbox
.name
{
...
...
@@ -227,6 +228,18 @@
color
:
black
;
}
.litegraph.lite-search-item-type
{
display
:
inline-block
;
background
:
rgba
(
0
,
0
,
0
,
0.2
);
margin-left
:
5px
;
font-size
:
14px
;
padding
:
2px
5px
;
position
:
relative
;
top
:
-2px
;
opacity
:
0.8
;
border-radius
:
4px
;
}
/* DIALOGs ******/
.litegraph
.dialog
{
...
...
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