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
ee3a12d2
Commit
ee3a12d2
authored
Apr 25, 2023
by
comfyanonymous
Browse files
Update litegraph from upstream.
parent
07194297
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
web/lib/litegraph.core.js
web/lib/litegraph.core.js
+3
-3
No files found.
web/lib/litegraph.core.js
View file @
ee3a12d2
...
@@ -9953,11 +9953,11 @@ LGraphNode.prototype.executeAction = function(action)
...
@@ -9953,11 +9953,11 @@ LGraphNode.prototype.executeAction = function(action)
}
}
break
;
break
;
case
"
slider
"
:
case
"
slider
"
:
var
range
=
w
.
options
.
max
-
w
.
options
.
min
;
var
old_value
=
w
.
value
;
var
nvalue
=
Math
.
clamp
((
x
-
15
)
/
(
widget_width
-
30
),
0
,
1
);
var
nvalue
=
Math
.
clamp
((
x
-
15
)
/
(
widget_width
-
30
),
0
,
1
);
if
(
w
.
options
.
read_only
)
break
;
if
(
w
.
options
.
read_only
)
break
;
w
.
value
=
w
.
options
.
min
+
(
w
.
options
.
max
-
w
.
options
.
min
)
*
nvalue
;
w
.
value
=
w
.
options
.
min
+
(
w
.
options
.
max
-
w
.
options
.
min
)
*
nvalue
;
if
(
w
.
c
al
lback
)
{
if
(
old_value
!=
w
.
v
al
ue
)
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
inner_value_change
(
w
,
w
.
value
);
inner_value_change
(
w
,
w
.
value
);
},
20
);
},
20
);
...
@@ -10044,7 +10044,7 @@ LGraphNode.prototype.executeAction = function(action)
...
@@ -10044,7 +10044,7 @@ LGraphNode.prototype.executeAction = function(action)
if
(
event
.
click_time
<
200
&&
delta
==
0
)
{
if
(
event
.
click_time
<
200
&&
delta
==
0
)
{
this
.
prompt
(
"
Value
"
,
w
.
value
,
function
(
v
)
{
this
.
prompt
(
"
Value
"
,
w
.
value
,
function
(
v
)
{
// check if v is a valid equation or a number
// check if v is a valid equation or a number
if
(
/^
[
0-9+
\-
*
/
()
\s]
+$/
.
test
(
v
))
{
if
(
/^
[
0-9+
\-
*
/
()
\s]
+
|
\d
+
\.\d
+
$/
.
test
(
v
))
{
try
{
//solve the equation if possible
try
{
//solve the equation if possible
v
=
eval
(
v
);
v
=
eval
(
v
);
}
catch
(
e
)
{
}
}
catch
(
e
)
{
}
...
...
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