This pull request fixes a bug where the bounds of the minimap are not calculated correctly because editor.GridContentBounds.Max isn't actually initialized with the smallest float possible. FLT_MIN is the smallest positive float (a.k.a. the one that is closest to zero); what we actually need is -FLT_MAX.
How to reproduce the bug:
Create a node and drag it up: the minimap will start to show a lot of empty space below the node:
With this pull request:
The exact same node layout gives this minimap, which is centered on the node as expected:
This pull request fixes a bug where the bounds of the minimap are not calculated correctly because
editor.GridContentBounds.Max
isn't actually initialized with the smallest float possible.FLT_MIN
is the smallest positive float (a.k.a. the one that is closest to zero); what we actually need is-FLT_MAX
.How to reproduce the bug:
Create a node and drag it up: the minimap will start to show a lot of empty space below the node:
With this pull request:
The exact same node layout gives this minimap, which is centered on the node as expected: