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

Adding a parameter in config to be able to disable link force #278

Merged

Conversation

antoninklopp
Copy link
Collaborator

Adding feature discussed in #274

The example below is the one described in the doc as small sample config statically positioned nodes.. However, if we take a look at the picture below, the nodes are not positioned as the user would like since the node config states :

{
            id: 3,
            name: "C",
            x: 400,
            y: 100,
        },
        {
            id: 4,
            name: "D",
            x: 400,
            y: 200,
        },

And we can see that C and D or not vertically aligned but they should because they have the same x coordinate.
The option fixes this behavior.

With disableLinkForce=false, before code change:

static-false

With disableLinkForce=true, with option after code change:
static-true

I added this option in the static data config, since it's more closer to what the description of the data says.

@antoninklopp
Copy link
Collaborator Author

The two blank lines in in the documentation are added because of the pre-commit hooks.

@danielcaldas
Copy link
Owner

The results look awesome! Thank you so much for the contribution @antoninklopp. I'm still unsure on how to communicate this feature, I'll probably tag this as experimental on the next release, to see how developers react to it.

@danielcaldas danielcaldas merged commit b328f6f into danielcaldas:master Jan 11, 2020
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.

None yet

2 participants