= oldskips;

    if (myRemoveTimer === null) {
      // only remove offscreen nodes after a delay
      myRemoveTimer = setTimeout(() => removeOffscreen(diagram), 3000);
    }

    updateCounts(); // only for this sample
  }

  // occasionally remove Parts that are offscreen from the Diagram
  var myRemoveTimer = null;

  function removeOffscreen(diagram) {
    myRemoveTimer = null;

    const viewb = diagram.viewportBounds;
    const model = diagram.model;
    const remove = []; // collect for later remova