insertArrayItem method

void insertArrayItem(
  1. Array arr,
  2. num idx, [
  3. dynamic val
])

Add an item to a data array that may be data bound by a Panel as its Panel#itemArray, given a new data value and the index at which to insert the new value, in a manner that can be undone/redone and that automatically updates any bindings.

This also calls #raiseChangedEvent to notify all listeners about the ChangedEvent.Insert.

If you want to add a new node or part to the diagram, call #addNodeData. @param {Array.<>} arr an Array that is the value of some Panel's Panel#itemArray. @param {number} idx the zero-based array index where the new value will be inserted; use -1 to push the new value on the end of the array. @param {} val the new value to be inserted into the array. @see #removeArrayItem

Implementation

void insertArrayItem(
  _i7.Array<_i2.dynamic> arr,
  _i2.num idx, [
  _i2.dynamic val,
]) {
  _i4.callMethod(
    this,
    'insertArrayItem',
    [
      arr,
      idx,
      val,
    ],
  );
}