getSelection() {
    return {
      nodes: this.getSelectedNodeIds(),
      edges: this.getSelectedEdgeIds(),
    };
  }
Retrieve the currently selected node and edge ids.
@returns {{nodes: Array.<string>, edges: Array.<string>}} Arrays with the
ids of the selected nodes and edges.