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

Copy-Paste does not retain connection involving dynamic interfaces. #343

Closed
yojeek opened this issue Nov 21, 2023 · 1 comment
Closed

Copy-Paste does not retain connection involving dynamic interfaces. #343

yojeek opened this issue Nov 21, 2023 · 1 comment
Labels
bug Something isn't working
Projects

Comments

@yojeek
Copy link
Contributor

yojeek commented Nov 21, 2023

As the hook only applied to the interfaces already present in copiedNode, dynamic interfaces created during load() call will appear broken.

            const tapInterfaces = (intfs: Record<string, NodeInterface<any>>) => {
                Object.values(intfs).forEach((intf) => {
                    intf.hooks.load.subscribe(token, (intfState) => {
                        const newIntfId = uuidv4();
                        idmap.set(intfState.id, newIntfId);
                        intf.id = newIntfId;
                        intf.hooks.load.unsubscribe(token);
                        return intfState;
                    });
                });
            };

            tapInterfaces(copiedNode.inputs);
            tapInterfaces(copiedNode.outputs);
@newcat newcat added the bug Something isn't working label Dec 30, 2023
@newcat newcat added this to In progress in V2 Dec 30, 2023
@newcat newcat moved this from In progress to Done but not released in V2 Dec 31, 2023
@newcat
Copy link
Owner

newcat commented Jan 2, 2024

Fixed in v2.3.0

@newcat newcat closed this as completed Jan 2, 2024
@newcat newcat moved this from Done but not released to Done in V2 Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
V2
  
Done
Development

No branches or pull requests

2 participants