linkCategoryProperty property

Object linkCategoryProperty

Gets or sets the name of the data property that returns a string naming that data's category, 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 category name; if the second argument is supplied, the function should modify the link data object so that it has that new category name. The default value is the name 'category', meaning that it expects the data to have a property named 'category' if it cares to name the category for the Link. This is used by the diagram to distinguish between different kinds of links. The name must not be null. If the value is an empty string, #getCategoryForLinkData will return an empty string 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 linkCategoryProperty => _i4.getProperty(
      this,
      'linkCategoryProperty',
    );
void linkCategoryProperty=(Object value)

Implementation

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