draw() {
    this.checkContext();

    if (!this.stave) {
      throw new Vex.RERR('NoStave', "Can't draw without a stave.");
    }

    if (this.ys.length === 0) {
      throw new Vex.RERR('NoYValues', "Can't draw note without Y values.");
    }

    this.setRendered();
    const render_stem = this.beam == null && this.render_options.draw_stem;

    // VexFlowPatch: open group for tabnote, so that the SVG DOM has a named element for tabnote, like stavenote
    this.context.openGroup('tabnote', null, { pointerBBox: true });
    this.drawPositions();
    this.drawStemThrough();

    const stem_x = this.getStemX();

    this.stem.setNoteHeadXBounds(stem_x, stem_x);

    if (render_stem) {
      this.context.openGroup('stem', null, { pointerBBox: true });
      this.stem.setContext(this.context).draw();
      this.context.closeGroup();
    }

    this.drawFlag();
    this.drawModifiers();
    this.context.closeGroup();
  }
// The main rendering function for the entire note
The main rendering function for the entire note
The main rendering function for the entire note
draw() {
    this.checkContext();
    if (!this.stave) {
      throw new Vex.RERR('NoStave', "Can't draw without a stave.");
    }
    if (this.ys.length === 0) {
      throw new Vex.RERR('NoYValues', "Can't draw note without Y values.");
    }
    this.setRendered();
    const render_stem = this.beam == null && this.render_options.draw_stem;
    this.context.openGroup('tabnote', null, { pointerBBox: true });
    this.drawPositions();
    this.drawStemThrough();
    const stem_x = this.getStemX();
    this.stem.setNoteHeadXBounds(stem_x, stem_x);
    if (render_stem) {
      this.context.openGroup('stem', null, { pointerBBox: true });
      this.stem.setContext(this.context).draw();
      this.context.closeGroup();
    }
    this.drawFlag();
    this.drawModifiers();
    this.context.closeGroup();
  }
draw ( ) { this . checkContext ( ) ; if ( ! this . stave ) { throw new Vex . RERR ( 'NoStave' , "Can't draw without a stave." ) ; } if ( this . ys . length === 0 ) { throw new Vex . RERR ( 'NoYValues' , "Can't draw note without Y values." ) ; } this . setRendered ( ) ; const render_stem = this . beam == null && this . render_options . draw_stem ; this . context . openGroup ( 'tabnote' , null , { pointerBBox : true } ) ; this . drawPositions ( ) ; this . drawStemThrough ( ) ; const stem_x = this . getStemX ( ) ; this . stem . setNoteHeadXBounds ( stem_x , stem_x ) ; if ( render_stem ) { this . context . openGroup ( 'stem' , null , { pointerBBox : true } ) ; this . stem . setContext ( this . context ) . draw ( ) ; this . context . closeGroup ( ) ; } this . drawFlag ( ) ; this . drawModifiers ( ) ; this . context . closeGroup ( ) ; }
The main rendering function for the entire note
The main rendering function for the entire note
// VexFlowPatch: open group for tabnote, so that the SVG DOM has a named element for tabnote, like stavenote