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
bfb13f5e
Commit
bfb13f5e
authored
May 22, 2023
by
comfyanonymous
Browse files
Remove useless call to /object_info
parent
db27b040
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
web/extensions/core/colorPalette.js
web/extensions/core/colorPalette.js
+5
-5
No files found.
web/extensions/core/colorPalette.js
View file @
bfb13f5e
...
@@ -174,7 +174,7 @@ const els = {}
...
@@ -174,7 +174,7 @@ const els = {}
// const ctxMenu = LiteGraph.ContextMenu;
// const ctxMenu = LiteGraph.ContextMenu;
app
.
registerExtension
({
app
.
registerExtension
({
name
:
id
,
name
:
id
,
init
(
)
{
addCustomNodeDefs
(
node_defs
)
{
const
sortObjectKeys
=
(
unordered
)
=>
{
const
sortObjectKeys
=
(
unordered
)
=>
{
return
Object
.
keys
(
unordered
).
sort
().
reduce
((
obj
,
key
)
=>
{
return
Object
.
keys
(
unordered
).
sort
().
reduce
((
obj
,
key
)
=>
{
obj
[
key
]
=
unordered
[
key
];
obj
[
key
]
=
unordered
[
key
];
...
@@ -182,10 +182,10 @@ app.registerExtension({
...
@@ -182,10 +182,10 @@ app.registerExtension({
},
{});
},
{});
};
};
const
getSlotTypes
=
async
()
=>
{
function
getSlotTypes
()
{
var
types
=
[];
var
types
=
[];
const
defs
=
await
api
.
getN
ode
D
efs
()
;
const
defs
=
n
ode
_d
efs
;
for
(
const
nodeId
in
defs
)
{
for
(
const
nodeId
in
defs
)
{
const
nodeData
=
defs
[
nodeId
];
const
nodeData
=
defs
[
nodeId
];
...
@@ -212,8 +212,8 @@ app.registerExtension({
...
@@ -212,8 +212,8 @@ app.registerExtension({
return
types
;
return
types
;
};
};
const
completeColorPalette
=
async
(
colorPalette
)
=>
{
function
completeColorPalette
(
colorPalette
)
{
var
types
=
await
getSlotTypes
();
var
types
=
getSlotTypes
();
for
(
const
type
of
types
)
{
for
(
const
type
of
types
)
{
if
(
!
colorPalette
.
colors
.
node_slot
[
type
])
{
if
(
!
colorPalette
.
colors
.
node_slot
[
type
])
{
...
...
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