VivaGraphJS icon indicating copy to clipboard operation
VivaGraphJS copied to clipboard

Nodes have reversed positions to edges.

Open olejka91 opened this issue 7 years ago • 4 comments

I found out Vivagraph few weeks ago. It`s really interesting. But I met a problem when I render .png images with webgl, nodes and edges are reversed.

When I select node and move it works wrong on Y axis. screenshot from 2017-04-07 17-52-58

olejka91 avatar Apr 07 '17 15:04 olejka91

line: 5413 = > changed

pos.y = ui.position.y; to=> pos.y = -ui.position.y;

olejka91 avatar Apr 09 '17 08:04 olejka91

@olejka91 which file? Could you be more specific? I have the same problem.

Thanks.

mauriciogior avatar Apr 24 '17 19:04 mauriciogior

Hi, actually I didnt solve this on the level I want to, because if you add textlabels using webglDOMLabels method then images will move correct but textnodes in opposite way. I didnt try figure out how to solve it because after I found out that webglDOMLabels adds not webgl components but DOM elements I decided to refuse from this lib, because I have really large graphs (about 10 thousands nodes, nodelabels and edgelabels )

You have to open vivagraph.js lib file, find out row #5413 and change it to pos.y = - ui.position.y;

Try D3V4 using canvas it`s actually fast enough.

olejka91 avatar Apr 25 '17 07:04 olejka91

:) surprised this hasn't been fixed. I have the same issue, sure enough reversing the y axis works.

Change needs to be made in webglGraphics.js in the renderNodes function. I'll report back with the text label fix too when I run into that as well.

cloudtracer avatar Feb 25 '18 23:02 cloudtracer