1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- "use strict";
- var VerticalGraphicalStaffEntryContainer = (function () {
- function VerticalGraphicalStaffEntryContainer(numberOfEntries, absoluteTimestamp) {
- this.staffEntries = [];
- this.absoluteTimestamp = absoluteTimestamp;
- for (var i = 0; i < numberOfEntries; i++) {
- this.staffEntries.push(undefined);
- }
- }
- Object.defineProperty(VerticalGraphicalStaffEntryContainer.prototype, "Index", {
- get: function () {
- return this.index;
- },
- set: function (value) {
- this.index = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(VerticalGraphicalStaffEntryContainer.prototype, "AbsoluteTimestamp", {
- get: function () {
- return this.absoluteTimestamp;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(VerticalGraphicalStaffEntryContainer.prototype, "StaffEntries", {
- //
- //public set AbsoluteTimestamp(value: Fraction) {
- // this.absoluteTimestamp = value;
- //}
- get: function () {
- return this.staffEntries;
- },
- set: function (value) {
- this.staffEntries = value;
- },
- enumerable: true,
- configurable: true
- });
- VerticalGraphicalStaffEntryContainer.compareByTimestamp = function (x, y) {
- var xValue = x.absoluteTimestamp.RealValue;
- var yValue = y.absoluteTimestamp.RealValue;
- if (xValue < yValue) {
- return -1;
- }
- else if (xValue > yValue) {
- return 1;
- }
- else {
- return 0;
- }
- };
- VerticalGraphicalStaffEntryContainer.prototype.getFirstNonNullStaffEntry = function () {
- for (var idx = 0, len = this.staffEntries.length; idx < len; ++idx) {
- var graphicalStaffEntry = this.staffEntries[idx];
- if (graphicalStaffEntry !== undefined) {
- return graphicalStaffEntry;
- }
- }
- return undefined;
- };
- return VerticalGraphicalStaffEntryContainer;
- }());
- exports.VerticalGraphicalStaffEntryContainer = VerticalGraphicalStaffEntryContainer;
|