ect(d.bounds);
      }
    }
    return b;
  }

  // As the user scrolls or zooms, make sure the Parts (Nodes and Links) exist in the viewport.
  function onViewportChanged(e) {
    const diagram = e.diagram;
    // make sure there are Nodes for each node data that is in the viewport
    // or that is connected to such a Node
    const viewb = diagram.viewportBounds; // the new viewportBounds
    const model = diagram.model;

    const oldskips = diagram.skipsUndoManager;
    diagram.skipsUndoManager = true