linkToKeyProperty property

Object linkToKeyProperty

Gets or sets the name of the data property that returns the key of the node data that the link data is going to, The value may also be a function taking two arguments, where the first argument will be a link data object. If the second argument is not supplied, the function should return the key of the link's destination node; if the second argument is supplied, the function should modify the link data object so that it has that new key (which may be undefined to refer to no node) as the identifier to the "to" node. The default value is the name 'to', meaning that it expects the data to have a property named 'to' to refer to the link's destination node. The name must not be null. If the value is an empty string, #getToKeyForLinkData will return undefined for all link data objects.

If you want to set this property you must do so before using the model, and especially before you assign Diagram#model. Note that functions cannot be serialized into JSON-formatted text, so if you are using #toJson and Model.fromJson, and if you want this property to be a function, you will need to assign this property to your desired function immediately after creating the model, including when it is created by Model.fromJson.

Implementation

_i2.Object get linkToKeyProperty => _i4.getProperty(
      this,
      'linkToKeyProperty',
    );
void linkToKeyProperty=(Object value)

Implementation

set linkToKeyProperty(_i2.Object value) {
  _i4.setProperty(
    this,
    'linkToKeyProperty',
    value,
  );
}