본문으로 건너뛰기

Overrides

If you redeclare a shape, the new declaration is merged with the previous declaration.

Visual Studio Code Text Editor

The latest explicit setting of the label takes priority.

Here's a more complex example of overrides involving containers:

AWS S3 San Francisco, CaliforniaMonitoringCaliforniaSan Francisco

Null

You may override with the value null to delete the shape/connection/attribute.

two

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

onetwo

Nulling an attribute

one

Implicit nulls

If you null a shape with connections, its connections are also nulled (since every connection in D2 needs an endpoint).

one

If you null a shape with descendents, those descendants are also nulled.

one