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

Reverse init order #227

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Reverse init order #227

merged 1 commit into from
Jul 26, 2024

Conversation

huchenlei
Copy link
Member

Reverse init order of vue app and comfy app so that the custom node can call app.extensionManager when init hook is called.

@@ -129,6 +130,9 @@ export class ComfyApp {
this.bodyLeft = $el('div.comfyui-body-left', { parent: document.body })
this.bodyRight = $el('div.comfyui-body-right', { parent: document.body })
this.bodyBottom = $el('div.comfyui-body-bottom', { parent: document.body })
this.canvasContainer = $el('div.graph-canvas-container', {
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 move is necessary as Vue requires teleport target to be available when the component is mounted. If we load ComfyApp after VueApp, the container need to inited in the constructor instead of setup function.

<teleport to="#graph-canvas-container">
<LiteGraphCanvasSplitterOverlay>
<teleport to=".graph-canvas-container">
<LiteGraphCanvasSplitterOverlay v-if="betaMenuEnabled">
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove all overlay + sidebar when beta menu is disabled.

@huchenlei huchenlei merged commit dc13ed1 into Comfy-Org:main Jul 26, 2024
3 checks passed
@huchenlei huchenlei deleted the reverse branch July 26, 2024 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant