Diffusion Rocs f8319560ea8a

Fix generated graphs being off the canvas.

Authored by adridg on Jul 27 2019, 9:53 AM.

Description

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.

Details

Committed
adridgJul 27 2019, 10:36 AM
Parents
R73:0afd405da25d: Merge branch 'reduce-warnings' into 'master'
Branches
Unknown
Tags
Unknown