setOptions(options) {
    if (!options) {
      return;
    }

    // Following options if changed affect the layout.
    let affectsLayout =
      (typeof options.physics !== "undefined" &&
        this.options.physics !== options.physics) ||
      (typeof options.hidden !== "undefined" &&
        (this.options.hidden || false) !== (options.hidden || false)) ||
      (typeof options.from !== "undefined" &&
        this.options.from !== options.from) ||
      (typeof options.to !== "undefined" && this.options.to !== options.to);

    Edge.parseOptions(this.options, options, true, this.globalOptions);

    if (options.id !== undefined) {
      this.id = options.id;
    }
    if (options.from !== undefined) {
      this.fromId = options.from;
    }
    if (options.to !== undefined) {
      this.toId = options.to;
    }
    if (options.title !== undefined) {
      this.title = options.title;
    }
    if (options.value !== undefined) {
      options.value = parseFloat(options.value);
    }

    const pile = [options, this.options, this.defaultOptions];
    this.chooser = choosify("edge", pile);

    // update label Module
    this.updateLabelModule(options);

    // Update edge type, this if changed affects the layout.
    affectsLayout = this.updateEdgeType() || affectsLayout;

    // if anything has been updates, reset the selection width and the hover width
    this._setInteractionWidths();

    // A node is connected when it has a from and to node that both exist in the network.body.nodes.
    this.connect();

    return affectsLayout;
  }
Set or overwrite options for the edge
@param {object} options  an object with options
@returns {undefined|boolean} undefined if no options, true if layout affecting data changed, false otherwise.