The fit
library is really helpful in many situations.
It works as expected to create nodes that appear to include a bunch of other graphical objects.
But it can be used effectively in other scenarios: it is quite common to use the fit
key in conjunction with shift
to make a node as wide (high) as a set of other nodes and then displace it besides them.
I think use cases like this are sufficiently common to justify unpacking the fit
key in smaller components to allow for finer control.
For example:
north
, south
, east
and west
; many times you only want the width to be asjusted; it would then make sense to also define fit width
and fit height
.fit
key more than once only the last will have an effect. It would be nice to have also fit
variants to add some nodes to the fit key. This could work by just taking the max of the current size and the size covering the provided coordinates.