nodeParentKeyProperty property

Object get nodeParentKeyProperty

Gets or sets the name of the property on node data that specifies the string or number key of the node data that acts as the "parent" for this "child" node data. The value may also be a function taking two arguments, where the first argument will be a node data object. If the second argument is not supplied, the function should return the string or number key for the parent node data object of which the given data object is a child; if the second argument is supplied, the function should modify the node data object so that it has that new key (which may be undefined to refer to no node) as the parent key for that node.. The default value is the name 'parent', meaning that it expects the data to have a property named 'parent' if the node wants to refer to the parent node by its key. The value must not be null nor an empty string.

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 nodeParentKeyProperty => _i4.getProperty(
      this,
      'nodeParentKeyProperty',
    );
set nodeParentKeyProperty (Object value)

Implementation

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