drawDashedWedge(line) {
    if (isNaN(line.from.x) || isNaN(line.from.y) || isNaN(line.to.x) || isNaN(line.to.y)) {
      return;
    }

    let ctx = this.ctx;
    let offsetX = this.offsetX;
    let offsetY = this.offsetY;
    let l = line.getLeftVector().clone();
    let r = line.getRightVector().clone();
    l.x += offsetX;
    l.y += offsetY;
    r.x += offsetX;
    r.y += offsetY;
    ctx.save();
    let normals = Vector2.normals(l, r);
    normals[0].normalize();
    normals[1].normalize();
    let isRightChiralCenter = line.getRightChiral();
    let start;
    let end;
    let sStart;
    let sEnd;
    let shortLine = line.clone();

    if (isRightChiralCenter) {
      start = r;
      end = l;
      shortLine.shortenRight(1.0);
      sStart = shortLine.getRightVector().clone();
      sEnd = shortLine.getLeftVector().clone();
    } else {
      start = l;
      end = r;
      shortLine.shortenLeft(1.0);
      sStart = shortLine.getLeftVector().clone();
      sEnd = shortLine.getRightVector().clone();
    }

    sStart.x += offsetX;
    sStart.y += offsetY;
    sEnd.x += offsetX;
    sEnd.y += offsetY;
    let dir = Vector2.subtract(end, start).normalize();
    ctx.strokeStyle = this.themeManager.getColor('C');
    ctx.lineCap = 'round';
    ctx.lineWidth = this.opts.bondThickness;
    ctx.beginPath();
    let length = line.getLength();
    let step = 1.25 / (length / (this.opts.bondThickness * 3.0));
    let changed = false;

    for (var t = 0.0; t < 1.0; t += step) {
      let to = Vector2.multiplyScalar(dir, t * length);
      let startDash = Vector2.add(start, to);
      let width = 1.5 * t;
      let dashOffset = Vector2.multiplyScalar(normals[0], width);

      if (!changed && t > 0.5) {
        ctx.stroke();
        ctx.beginPath();
        ctx.strokeStyle = this.themeManager.getColor(line.getRightElement()) || this.themeManager.getColor('C');
        changed = true;
      }

      startDash.subtract(dashOffset);
      ctx.moveTo(startDash.x, startDash.y);
      startDash.add(Vector2.multiplyScalar(dashOffset, 2.0));
      ctx.lineTo(startDash.x, startDash.y);
    }

    ctx.stroke();
    ctx.restore();
  }
Draw a dashed wedge on the canvas.

@param {Line} line A line.