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

When using layers, "TypeError: newTranslation is undefined" is thrown #163

Open
magjac opened this issue May 22, 2020 · 1 comment
Open
Labels

Comments

@magjac
Copy link
Owner

magjac commented May 22, 2020

It seems to render the first layer correctly, but is unclear what will happen if you try to render another graph using the same Graphviz renderer.

The following DOT code from the FAQ, makes d3-graphviz throw TypeError: newTranslation is undefined at https://github.com/magjac/d3-graphviz/blob/master/src/zoom.js#L61.

digraph G {
	layers="local:pvt:test:new:ofc";

	node1  [layer="pvt"];
	node2  [layer="all"];
	node3  [layer="pvt:ofc"];		/* pvt, test, new, and ofc */
	node2 -> node3  [layer="pvt:all"];	/* same as pvt:ofc */
	node2 -> node4 [layer=3];		/* same as test */
}

Some more background info can be found at:

https://forum.graphviz.org/t/how-to-share-svg-files/101
https://forum.graphviz.org/t/getting-layers-to-work-with-svg/107

@magjac
Copy link
Owner Author

magjac commented May 22, 2020

Note also enhancement proposal #164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant