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

Conversation

@danielcaldas
Copy link
Owner

danielcaldas commented Oct 21, 2017

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 Oct 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.