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
b5ece635
Commit
b5ece635
authored
Jan 13, 2024
by
comfyanonymous
Browse files
Merge branch 'undoredo-fix-modifiers' of
https://github.com/pythongosssss/ComfyUI
parents
18511dd5
9bddc9d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
web/extensions/core/groupNode.js
web/extensions/core/groupNode.js
+1
-0
web/extensions/core/undoRedo.js
web/extensions/core/undoRedo.js
+11
-0
No files found.
web/extensions/core/groupNode.js
View file @
b5ece635
...
...
@@ -884,6 +884,7 @@ export class GroupNodeHandler {
const r = onDrawForeground?.apply?.(this, arguments);
if (+app.runningNodeId === this.id && this.runningInternalNodeId !== null) {
const n = groupData.nodes[this.runningInternalNodeId];
if(!n) return;
const message = `
Running
$
{
n
.
title
||
n
.
type
}
(
$
{
this
.
runningInternalNodeId
}
/${groupData.nodes.length}
)
`
;
ctx
.
save
();
ctx
.
font
=
"
12px sans-serif
"
;
...
...
web/extensions/core/undoRedo.js
View file @
b5ece635
...
...
@@ -106,6 +106,7 @@ const bindInput = (activeEl) => {
}
};
let
keyIgnored
=
false
;
window
.
addEventListener
(
"
keydown
"
,
(
e
)
=>
{
...
...
@@ -116,6 +117,9 @@ window.addEventListener(
return
;
}
keyIgnored
=
e
.
key
===
"
Control
"
||
e
.
key
===
"
Shift
"
||
e
.
key
===
"
Alt
"
||
e
.
key
===
"
Meta
"
;
if
(
keyIgnored
)
return
;
// Check if this is a ctrl+z ctrl+y
if
(
await
undoRedo
(
e
))
return
;
...
...
@@ -127,6 +131,13 @@ window.addEventListener(
true
);
window
.
addEventListener
(
"
keyup
"
,
(
e
)
=>
{
if
(
keyIgnored
)
{
keyIgnored
=
false
;
checkState
();
}
});
// Handle clicking DOM elements (e.g. widgets)
window
.
addEventListener
(
"
mouseup
"
,
()
=>
{
checkState
();
...
...
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