Fix generated graphs being off the canvas.
- When using the generate-graph tool with an empty canvas, most of the generators produce graphs with some nodes with negative X or Y coordinates; these lie outside of the canvas and are not shown in the UI. This is confusing. Introduce a (template) method that checks if a given iterable collection of nodes lies outside of the canvas, and if so translates (slides) the entire collection by enough so that it does lie inside the canvas. Use this method in all the graph types that have an identifiable NodePtr collection -- the random graphs are not fixed yet.
parent
0afd405d
Please register or sign in to comment