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

How to Add a node at a specific position with new framework #719

Open
1 task done
pokecheater opened this issue Dec 20, 2024 · 1 comment
Open
1 task done

How to Add a node at a specific position with new framework #719

pokecheater opened this issue Dec 20, 2024 · 1 comment

Comments

@pokecheater
Copy link

Description

Hi Rete Team,

in your old version from 2 or 3 years ago it was possible to set the node position with:

image

Now I can't figure out how to set the node position manually. I searched your guides but all of your examples are always using the same autolayouter.

Thx in advance

Suggested Solution

Give an example in your docs.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ComsiComsa
Copy link

You can try using a method from new AreaPlugin<Schemes, AreaExtra>(container).
This requires a node ID, and the complete code would look something like this:

    const area = new AreaPlugin<Schemes, AreaExtra>(container);
    await area.translate(node.id, { x: position.x, y: position.y });

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

No branches or pull requests

2 participants