Comfy-Org / Comfy-Org/ComfyUI

zIndex on line 267 in web/script/domWidget.js

Open
#2,342 0 comments 0 reactions 0 assignees View on GitHub
User Support
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

Here is the surrounding of line 267 in web/script/domWidget.js
```javascript
Object.assign(element.style, {
transformOrigin: "0 0",
transform: scale,
left: `${transform.a + transform.e}px`,
top: `${transform.d + transform.f}px`,
width: `${widgetWidth - margin * 2}px`,
height: `${(widget.computedHeight ?? 50) - margin * 2}px`,
position: "absolute",
zIndex: app.graph._nodes.indexOf(node),
});
```
Basically, I'm questionning the usefulness of `zIndex: app.graph._nodes.indexOf(node),`.
I'm not completely sure why this is there, but here is the behavior with line 267 uncommented:

https://github.com/comfyanonymous/ComfyUI/assets/1372055/a95acb1b-c5e4-49d7-8918-a99dd52fb31a

and now with the line 267 commented:

https://github.com/comfyanonymous/ComfyUI/assets/1372055/8af56e52-ec0c-45d8-b394-179c0df72f3c

Again, I'm not sure what line 267 is trying to achieve, but the behavior without it seem more satisfying.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.