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
34030fed
"vscode:/vscode.git/clone" did not exist on "20f0cbc88ff6bda5cf0cf6dba2ccf7faa3275d9f"
Unverified
Commit
34030fed
authored
May 28, 2024
by
luke zhang
Committed by
GitHub
May 27, 2024
Browse files
improve dom widget performance (#3584)
parent
f6a20395
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
web/scripts/domWidget.js
web/scripts/domWidget.js
+3
-2
No files found.
web/scripts/domWidget.js
View file @
34030fed
...
@@ -11,9 +11,10 @@ function intersect(a, b) {
...
@@ -11,9 +11,10 @@ function intersect(a, b) {
else
return
null
;
else
return
null
;
}
}
function
getClipPath
(
node
,
element
,
elRect
)
{
function
getClipPath
(
node
,
element
)
{
const
selectedNode
=
Object
.
values
(
app
.
canvas
.
selected_nodes
)[
0
];
const
selectedNode
=
Object
.
values
(
app
.
canvas
.
selected_nodes
)[
0
];
if
(
selectedNode
&&
selectedNode
!==
node
)
{
if
(
selectedNode
&&
selectedNode
!==
node
)
{
const
elRect
=
element
.
getBoundingClientRect
();
const
MARGIN
=
7
;
const
MARGIN
=
7
;
const
scale
=
app
.
canvas
.
ds
.
scale
;
const
scale
=
app
.
canvas
.
ds
.
scale
;
...
@@ -269,7 +270,7 @@ LGraphNode.prototype.addDOMWidget = function (name, type, element, options) {
...
@@ -269,7 +270,7 @@ LGraphNode.prototype.addDOMWidget = function (name, type, element, options) {
});
});
if (enableDomClipping) {
if (enableDomClipping) {
element.style.clipPath = getClipPath(node, element
, elRect
);
element.style.clipPath = getClipPath(node, element);
element.style.willChange = "clip-path";
element.style.willChange = "clip-path";
}
}
...
...
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