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
c8afa7e9
Commit
c8afa7e9
authored
Apr 17, 2023
by
comfyanonymous
Browse files
Merge branch 'settings-slider' of
https://github.com/missionfloyd/ComfyUI
parents
b8c636b1
307ef543
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
web/extensions/core/snapToGrid.js
web/extensions/core/snapToGrid.js
+1
-1
web/scripts/ui.js
web/scripts/ui.js
+24
-0
web/style.css
web/style.css
+8
-0
No files found.
web/extensions/core/snapToGrid.js
View file @
c8afa7e9
...
...
@@ -9,7 +9,7 @@ app.registerExtension({
app
.
ui
.
settings
.
addSetting
({
id
:
"
Comfy.SnapToGrid.GridSize
"
,
name
:
"
Grid Size
"
,
type
:
"
numb
er
"
,
type
:
"
slid
er
"
,
attrs
:
{
min
:
1
,
max
:
500
,
...
...
web/scripts/ui.js
View file @
c8afa7e9
...
...
@@ -270,6 +270,30 @@ class ComfySettingsDialog extends ComfyDialog {
]),
]);
break
;
case
"
slider
"
:
element
=
$el
(
"
div
"
,
[
$el
(
"
label
"
,
{
textContent
:
name
},
[
$el
(
"
input
"
,
{
type
:
"
range
"
,
value
,
oninput
:
(
e
)
=>
{
setter
(
e
.
target
.
value
);
e
.
target
.
nextElementSibling
.
value
=
e
.
target
.
value
;
},
...
attrs
}),
$el
(
"
input
"
,
{
type
:
"
number
"
,
value
,
oninput
:
(
e
)
=>
{
setter
(
e
.
target
.
value
);
e
.
target
.
previousElementSibling
.
value
=
e
.
target
.
value
;
},
...
attrs
}),
]),
]);
break
;
default
:
console
.
warn
(
"
Unsupported setting type, defaulting to text
"
);
element
=
$el
(
"
div
"
,
[
...
...
web/style.css
View file @
c8afa7e9
...
...
@@ -217,6 +217,14 @@ button.comfy-queue-btn {
z-index
:
99
;
}
.comfy-modal.comfy-settings
input
[
type
=
"range"
]
{
vertical-align
:
middle
;
}
.comfy-modal.comfy-settings
input
[
type
=
"range"
]
+
input
[
type
=
"number"
]
{
width
:
3.5em
;
}
.comfy-modal
input
,
.comfy-modal
select
{
color
:
var
(
--input-text
);
...
...
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