}
public set length(newLength: number) {
- // TODO: Is this auto fill is needed or can it be
if (newLength > this._length) {
for (let i = this._length; i < newLength; i++) {
this._array[i] = undefined;
while (param--) {
if (this.lines.length === this.lines.maxLength) {
+ // Trim the start of lines to make room for the new line
this.lines.trimStart(1);
this.ybase--;
this.ydisp--;
while (param--) {
if (this.lines.length === this.lines.maxLength) {
- // Trim the start of lines to make room for the new temporary row
- // TODO: This section could be optimized by introducing a CircularList function that inserts,
- // deletes and shifts elements to accomplish this task.
+ // Trim the start of lines to make room for the new line
this.lines.trimStart(1);
this.ybase -= 1;
this.ydisp -= 1;