You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parameters d.shape and d.size were meant to be optional as is understood by looking at BridgesVisualizer.shapeLookup or by looking at line 62. When drawing links with drawCurvedLink, the computation of d2 uses d.target.size. If size was undefined line 62, I guess it is still undefined there, which probably causes shapeedge to return 0 or undefined and cause a division by 0, or something else of equally bad consequence.
@esaule says:
So, we noticed somethings on the graph-canvas visualization that could be worth adjusting.
In this file: https://github.com/squeetus/bridgesAPI/blob/master/public/js/graph-canvas.js line 58 performs a split on d.name, we could test the existence of d.name and set d.lines at "" or whatever is appropriate [""] ?
The parameters d.shape and d.size were meant to be optional as is understood by looking at BridgesVisualizer.shapeLookup or by looking at line 62. When drawing links with drawCurvedLink, the computation of d2 uses d.target.size. If size was undefined line 62, I guess it is still undefined there, which probably causes shapeedge to return 0 or undefined and cause a division by 0, or something else of equally bad consequence.
I don't exactly know how javascript works, when you dereference something that does not exist as a function parameter. But I suggest that all the functions in https://github.com/squeetus/bridgesAPI/blob/master/public/js/Bridges/BridgesVisualizer.js about scaling and ragning and what not test the parameter and if it is undefined return a sane default value.
The text was updated successfully, but these errors were encountered: