drawWedge(line, width = 1.0) {
    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; // Add a shadow behind the line

    let shortLine = line.clone().shorten(5.0);
    let l = shortLine.getLeftVector().clone();
    let r = shortLine.getRightVector().clone();
    l.x += offsetX;
    l.y += offsetY;
    r.x += offsetX;
    r.y += offsetY;
    l = line.getLeftVector().clone();
    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 = l;
    let end = r;

    if (isRightChiralCenter) {
      start = r;
      end = l;
    }

    let t = Vector2.add(start, Vector2.multiplyScalar(normals[0], this.halfBondThickness));
    let u = Vector2.add(end, Vector2.multiplyScalar(normals[0], 1.5 + this.halfBondThickness));
    let v = Vector2.add(end, Vector2.multiplyScalar(normals[1], 1.5 + this.halfBondThickness));
    let w = Vector2.add(start, Vector2.multiplyScalar(normals[1], this.halfBondThickness));
    ctx.beginPath();
    ctx.moveTo(t.x, t.y);
    ctx.lineTo(u.x, u.y);
    ctx.lineTo(v.x, v.y);
    ctx.lineTo(w.x, w.y);
    let gradient = this.ctx.createRadialGradient(r.x, r.y, this.opts.bondLength, r.x, r.y, 0);
    gradient.addColorStop(0.4, this.themeManager.getColor(line.getLeftElement()) || this.themeManager.getColor('C'));
    gradient.addColorStop(0.6, this.themeManager.getColor(line.getRightElement()) || this.themeManager.getColor('C'));
    ctx.fillStyle = gradient;
    ctx.fill();
    ctx.restore();
  }
Draw a wedge on the canvas.

@param {Line} line A line.
@param {Number} width The wedge width.