GraphicalVoiceEntry.ts 869 B

12345678910111213141516171819202122
  1. import {GraphicalObject} from "./GraphicalObject";
  2. import { VoiceEntry } from "../VoiceData/VoiceEntry";
  3. import { BoundingBox } from "./BoundingBox";
  4. import { GraphicalNote } from "./GraphicalNote";
  5. import { GraphicalStaffEntry } from "./GraphicalStaffEntry";
  6. /**
  7. * The graphical counterpart of a [[VoiceEntry]].
  8. */
  9. export class GraphicalVoiceEntry extends GraphicalObject {
  10. constructor(parentVoiceEntry: VoiceEntry, parentStaffEntry: GraphicalStaffEntry) {
  11. super();
  12. this.parentVoiceEntry = parentVoiceEntry;
  13. this.parentStaffEntry = parentStaffEntry;
  14. this.PositionAndShape = new BoundingBox(this, parentStaffEntry ? parentStaffEntry.PositionAndShape : undefined, true);
  15. this.notes = [];
  16. }
  17. public parentVoiceEntry: VoiceEntry;
  18. public parentStaffEntry: GraphicalStaffEntry;
  19. public notes: GraphicalNote[];
  20. }