updateEdgeType() {
    const smooth = this.options.smooth;
    let dataChanged = false;
    let changeInType = true;
    if (this.edgeType !== undefined) {
      if (
        (this.edgeType instanceof BezierEdgeDynamic &&
          smooth.enabled === true &&
          smooth.type === "dynamic") ||
        (this.edgeType instanceof CubicBezierEdge &&
          smooth.enabled === true &&
          smooth.type === "cubicBezier") ||
        (this.edgeType instanceof BezierEdgeStatic &&
          smooth.enabled === true &&
          smooth.type !== "dynamic" &&
          smooth.type !== "cubicBezier") ||
        (this.edgeType instanceof StraightEdge && smooth.type.enabled === false)
      ) {
        changeInType = false;
      }
      if (changeInType === true) {
        dataChanged = this.cleanup();
      }
    }
    if (changeInType === true) {
      if (smooth.enabled === true) {
        if (smooth.type === "dynamic") {
          dataChanged = true;
          this.edgeType = new BezierEdgeDynamic(
            this.options,
            this.body,
            this.labelModule
          );
        } else if (smooth.type === "cubicBezier") {
          this.edgeType = new CubicBezierEdge(
            this.options,
            this.body,
            this.labelModule
          );
        } else {
          this.edgeType = new BezierEdgeStatic(
            this.options,
            this.body,
            this.labelModule
          );
        }
      } else {
        this.edgeType = new StraightEdge(
          this.options,
          this.body,
          this.labelModule
        );
      }
    } else {
      // if nothing changes, we just set the options.
      this.edgeType.setOptions(this.options);
    }
    return dataChanged;
  }
update the edge type, set the options
@returns {boolean}