data property

dynamic get data

Gets or sets the optional model data to which this panel is data-bound. The data must be a JavaScript Object if this is a Part. The data can be any JavaScript value if this is a Panel created for an item in an Array that was data-bound by the #itemArray property. The default value is null.

Setting it to a new value automatically calls #updateTargetBindings in order to assign new values to all of the data-bound GraphObject properties.

Once you set this property you cannot add, remove, or modify any data bindings on any of the GraphObjects in the visual tree of this Panel, including on this panel itself.

You should not modify this property on a Part that is created automatically to represent model data, nor on a Panel that is created automatically for a data item in the containing Panel's Panel#itemArray. Call Model#removeNodeData and Model#addNodeData if you want to replace this Part with another one, or call Model#removeArrayItem and Model#insertArrayItem if you want to replace this Panel with another one.

Although you might not be able to replace this data value if this Part was created automatically by the Diagram, you can still modify that data object's properties. Call the appropriate Model method for changing properties that affect the structure of the diagram. Call Model#setDataProperty for changing other properties that may be the sources of Bindings on GraphObject properties that are in the visual tree of this panel/part.

Implementation

_i2.dynamic get data => _i4.getProperty(
      this,
      'data',
    );
set data (dynamic value)

Implementation

set data(_i2.dynamic value) {
  _i4.setProperty(
    this,
    'data',
    value,
  );
}