UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

36 lines (35 loc) 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Tied = void 0; const enums_1 = require("./enums"); /** * The <tied> element represents the notated tie. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/tied/. */ class Tied { element; constructor(element) { this.element = element; } /** Returns the type of tie. Defaults to null. */ getType() { return this.element.attr('type').enum(enums_1.TIED_TYPES); } /** Returns the placement of the tie. Defaults to null. */ getPlacement() { return this.element.attr('placement').enum(enums_1.ABOVE_BELOW); } getOrientation() { return this.element.attr('orientation').enum(enums_1.OVER_UNDER); } /** Returns the number of the tie. Defaults to 1. */ getNumber() { return this.element.attr('number').withDefault(1).int(); } /** Returns the line type of the tie. Defaults to solid. */ getLineType() { return this.element.attr('line-type').withDefault('solid').enum(enums_1.LINE_TYPES); } } exports.Tied = Tied;