Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta UI by pythongosssss #70

Merged
merged 6 commits into from
Jul 1, 2024
Merged

Beta UI by pythongosssss #70

merged 6 commits into from
Jul 1, 2024

Conversation

huchenlei
Copy link
Member

Closes #68.

@pythongosssss There is something wrong with canvas resize. See comments. Can you take a look?

Copy link
Member Author

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW there are also a ton of ts check errors to fix lol


// Clear fixed width and height while calculating rect so it uses 100% instead
this.canvasEl.height = this.canvasEl.width = NaN;
const { width, height } = this.canvasEl.getBoundingClientRect();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here width is correctly returned by height is 0 for some calls.


// Create and mount the LiteGraph in the DOM
const mainCanvas = document.createElement("canvas")
mainCanvas.style.touchAction = "none"
const canvasEl = (this.canvasEl = Object.assign(mainCanvas, { id: "graph-canvas" }));
canvasEl.tabIndex = 1;
document.body.prepend(canvasEl);
this.resizeCanvas();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call is getting correct width / height

Comment on lines +1678 to +1680
this.resizeCanvas();
window.addEventListener("resize", () => this.resizeCanvas());
const ro = new ResizeObserver(() => this.resizeCanvas());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These calls are getting height = 0

@pythongosssss
Copy link
Member

style.css doesnt seem to match, if I copy the file over from the main repo that fixes it

@huchenlei huchenlei added the enhancement New feature or request label Jul 1, 2024
@huchenlei
Copy link
Member Author

style.css doesnt seem to match, if I copy the file over from the main repo that fixes it

I think the problematic css changes are from comfyanonymous/ComfyUI#3909

@huchenlei huchenlei merged commit 0d084e2 into main Jul 1, 2024
3 checks passed
@huchenlei huchenlei deleted the betaui branch July 1, 2024 16:55
@pythongosssss
Copy link
Member

https://github.com/Comfy-Org/ComfyUI_frontend/compare/1f6eed8e736d531d5fcc32a378ce29f56125557b..fd3eb7f1eb8d449829622ea71a9aeeb97449654c

Looks like there were some additional/unintentionall changes in your merge? These seem to be the problem, merging in 3909 works fine for me

@huchenlei huchenlei restored the betaui branch July 1, 2024 16:58
huchenlei added a commit that referenced this pull request Jul 1, 2024
huchenlei added a commit that referenced this pull request Jul 1, 2024
@huchenlei
Copy link
Member Author

https://github.com/Comfy-Org/ComfyUI_frontend/compare/1f6eed8e736d531d5fcc32a378ce29f56125557b..fd3eb7f1eb8d449829622ea71a9aeeb97449654c

Looks like there were some additional/unintentionall changes in your merge? These seem to be the problem, merging in 3909 works fine for me

The @import url("scripts/ui/menu/menu.css"); is moved to .js file. Other flac check is sync from upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DevTask] Implement Beta UI
2 participants