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

Get edge path instead of position when using renderJSONObject #30

Open
croissantspectacular opened this issue Oct 20, 2022 · 0 comments

Comments

@croissantspectacular
Copy link

When using the renderJSONObject function, the edge is being represented inside a "pos" field, and it looks something like this:

{
    "tail": 43,
    "head": 49,
    "headport": "n",
    "minlen": "2",
    "pos": "e,588.18,5283.8 2179.2,5682.8 2179.2,5620.2 2098.8,5667 2049.2,5628.8 2017.3,5604.2 1994.2,5597.1 1994.2,5556.8 1994.2,5556.8 1994.2,5556.8 1994.2,5409.8 1994.2,5099.6 619.58,5586.3 588.71,5294.1",
    "tailport": "s"
}

However, it would be ideal to also get the edge path as well, like this:

<path 
    id="e1-2" 
    d="M10069.18,-3047.6C10069.18,-2984.21 9998.95,-2998.14 9977.18,-2938.6 9971.68,-2923.57 9974.66,-2918.4 9977.18,-2902.6 9991.81,-2810.71 10042.18,-2796.64 10042.18,-2703.6 10042.18,-2703.6 10042.18,-2703.6 10042.18,-2127 10042.18,-2074.5 10042.18,-2058.91 10042.18,-2011.03" 
>

Is there a possibility to add this "d" value inside path to the output of the renderJSONObject function?

Here is the Wiki of the original repository that uses this function by the way: https://github.com/mdaines/viz.js/wiki/API

Thanks in advance for all the help.

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

1 participant