storePositions() {
    // todo: add support for clusters and hierarchical.
    const dataArray = [];
    const dataset = this.body.data.nodes.getDataSet();

    for (const dsNode of dataset.get()) {
      const id = dsNode.id;
      const bodyNode = this.body.nodes[id];
      const x = Math.round(bodyNode.x);
      const y = Math.round(bodyNode.y);

      if (dsNode.x !== x || dsNode.y !== y) {
        dataArray.push({ id, x, y });
      }
    }

    dataset.update(dataArray);
  }
Load the XY positions of the nodes into the dataset.