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

Fix/set initial static graph #26

Merged
merged 10 commits into from
Oct 21, 2017
Merged

Conversation

danielcaldas
Copy link
Owner

This PR fixes #24, additionally it adds to the Sandbox component an example (with random generated values) on how to properly set positions for nodes x and y props:

decorateGraphNodesWithInitialPositioning = (nodes) => {
        return nodes.map(n => ({
            id: n.id,
            x: Math.floor(Math.random() * 500),
            y: Math.floor(Math.random() * 500),
            symbolType: n.symbolType || 'circle'
        }));
}

Also

  • Add .editorconfig
  • Config lint rules for test files with eslint-plugin-jest

@danielcaldas danielcaldas merged commit 95b34a6 into master Oct 21, 2017
@danielcaldas danielcaldas deleted the fix/set-initial-static-graph branch October 22, 2017 20:27
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.

Squeezing if "staticGraph": true
1 participant