constructor(options, body, imagelist, globalOptions, defaultOptions) {
    if (body === undefined) {
      throw new Error("No body provided");
    }

    // Since globalOptions is constant in values as well as reference,
    // Following needs to be done only once.

    this.options = bridgeObject(globalOptions);
    this.globalOptions = globalOptions;
    this.defaultOptions = defaultOptions;
    this.body = body;
    this.imagelist = imagelist;

    // initialize variables
    this.id = undefined;
    this.fromId = undefined;
    this.toId = undefined;
    this.selected = false;
    this.hover = false;
    this.labelDirty = true;

    this.baseWidth = this.options.width;
    this.baseFontSize = this.options.font.size;

    this.from = undefined; // a node
    this.to = undefined; // a node

    this.edgeType = undefined;

    this.connected = false;

    this.labelModule = new Label(
      this.body,
      this.options,
      true /* It's an edge label */
    );
    this.setOptions(options);
  }
@param {object} options        values specific to this edge, must contain at least 'from' and 'to'
@param {object} body           shared state from Network instance
@param {Network.Images} imagelist  A list with images. Only needed when the edge has image arrows.
@param {object} globalOptions  options from the EdgesHandler instance
@param {object} defaultOptions default options from the EdgeHandler instance. Value and reference are constant