Overrides
If you redeclare a shape, the new declaration is merged with the previous declaration.
The latest explicit setting of the label takes priority.
Here's a more complex example of overrides involving containers:
Null
You may override with the value null
to delete the shape/connection/attribute.
When is this useful?
- Import a diagram from a colleague and remove the things you don't want.
- Multi-board compositions where you inherit all the objects from a board with some exceptions.
- Use globs to define connections between a batch of objects except one in particular you want to leave out.
Nulling a connection
Nulling an attribute
Implicit nulls
If you null a shape with connections, its connections are also nulled (since every connection in D2 needs an endpoint).
If you null a shape with descendents, those descendants are also nulled.