UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

25 lines (24 loc) 776 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Fermata = void 0; const enums_1 = require("./enums"); /** * The `<fermata>` element content represents the shape of the fermata sign. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/fermata/ */ class Fermata { element; constructor(element) { this.element = element; } /** Returns the shape of the fermata. Defaults to normal. */ getShape() { return this.element.content().enum(enums_1.FERMATA_SHAPES) ?? 'normal'; } /** Returns the type of fermata. Defaults to upright. */ getType() { return this.element.attr('type').withDefault('upright').enum(enums_1.FERMATA_TYPES); } } exports.Fermata = Fermata;