Skip to content

Commit

Permalink
Merge pull request #922 from rvilarl/migration/tabstave
Browse files Browse the repository at this point in the history
Migration/tabstave
  • Loading branch information
0xfe authored Apr 22, 2021
2 parents 342540f + 097113a commit 16d7694
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/tabstave.js → src/tabstave.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
// [VexFlow](http://vexflow.com) - Copyright (c) Mohit Muthanna 2010.

import { Vex } from './vex';
import { Stave } from './stave';
import { Stave, StaveOptions } from './stave';

export class TabStave extends Stave {
constructor(x, y, width, options) {
constructor(x: number, y: number, width: number, options: StaveOptions) {
const tab_options = {
spacing_between_lines_px: 13,
num_lines: 6,
top_text_position: 1,
...{
spacing_between_lines_px: 13,
num_lines: 6,
top_text_position: 1,
},
...options,
};

Vex.Merge(tab_options, options);
super(x, y, width, tab_options);
this.setAttribute('type', 'TabStave');
}

getYForGlyphs() {
getYForGlyphs(): number {
return this.getYForLine(2.5);
}

// Deprecated
addTabGlyph() {
addTabGlyph(): this {
this.addClef('tab');
return this;
}
Expand Down

0 comments on commit 16d7694

Please sign in to comment.