layer property

Layer? get layer

This read-only property returns the GraphObject's containing Layer, if there is any. A plain GraphObject cannot belong directly to a Layer -- only a Part can belong directly to a Layer.

This property is not settable. Normally one changes which Layer that a GraphObject is in by setting Part#layerName. Adding a Part to a Diagram will automatically add that Part to a Layer in that Diagram based on the layerName.

Implementation

_i3.Layer? get layer => _i4.getProperty(
      this,
      'layer',
    );
set layer (Layer? value)

Implementation

set layer(_i3.Layer? value) {
  _i4.setProperty(
    this,
    'layer',
    value ?? _i5.undefined,
  );
}