gram.skipsUndoManager = oldskips;
    }

    updateCounts(); // only for this sample
  }
  // end of virtualized Diagram

  // start of VirtualizedTree[Layout/Network] classes

  // Here we try to replace the dependence of TreeLayout on Nodes
  // with depending only on the data in the TreeModel.
  class VirtualizedTreeLayout extends go.TreeLayout {
    constructor(init) {
      super();
      this.isOngoing = false;
      this.model = null; // add this property for holding the whole TreeModel
      if (ini