Vis Network

Migrating from 5.4.1 to 6.0.0

Edit Edge Without Drag

The editWithoutDrag function receives from and to ids. According to the documentation it has always been that way. But in 5.4.1 (and for 3 year prio to this release) the manipulation.editEdge.editEdgeWithoutDrag function received internal node objects instead. As of 6.0.0 the behavior is in line with the documentation and other similar methods that is the from and to properties now contain the ids directly.

Old code that no longer works:

const options = {
  manipulation: {
    editEdge: {
      editWithoutDrag({ from, to }) {
        const fromId = from.id
        const toId = to.id
        …
      }
    }
  }
}
      

New code that achieves the same result:

const options = {
  manipulation: {
    editEdge: {
      editWithoutDrag({ from: fromId, to: toId }) {
        …
      }
    }
  }
}