thechiselgroup / biomixer

BioMixer
http://bio-mixer.appspot.com/
16 stars 13 forks source link

Break Node Positioning #408

Open everbeek opened 10 years ago

everbeek commented 10 years ago

I have been able to reliably do a mapping expansion, while the force layout is still positioning nodes, then move my mouse over the expanded node (anatomical orifice from SNOMEDCT), and it will disconnect the edges and put the node into the top left corner. NaN translate results show up in the console.

When I mouse over the new expand nodes, they jitter around in a weird ay, as though the cursor is tickling them. Very odd!

OH! I think it is because the temporary edges contribute to the graph for a short time, but in a disruptive way. This is very likely the problem. I would not want them to contribute to layouts at all, so I will look into the possibility of preventing them from doing so (in the most elegant way possible).

everbeek commented 9 years ago

Some changes changed the nature of this bug. Nodes no longer get removed from the layout with NaN coordinates, but they still do get shoved away from the mouse when they are hovered over. If you do it right, you can see clearly that the node is being rigidly repelled from the nodes to which it has temporary relations rendered.

I think I can fix this by giving temporary edges a weight of 0, but giving them a non-zero weight when they are made permanent. Undo/redo will cause this buggy behavior to show up (the edge will have a non-zero weight when we go backwards). That can be fixed by always setting the weight of temporary edges to 0 as they are brought into the graph, and permanent edges the non-zero weight.