[ts] Fixed incorrect calculation in AnimationState when expanding the tracks array. Closes #1360.

This commit is contained in:
badlogic 2019-05-28 11:26:38 +02:00
parent 78a0c8e4f4
commit 9083f32ad5
13 changed files with 13 additions and 13 deletions

View File

@ -1755,7 +1755,7 @@ var spine;
AnimationState.prototype.expandToIndex = function (index) {
if (index < this.tracks.length)
return this.tracks[index];
spine.Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null);
spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);
this.tracks.length = index + 1;
return null;
};

File diff suppressed because one or more lines are too long

View File

@ -1755,7 +1755,7 @@ var spine;
AnimationState.prototype.expandToIndex = function (index) {
if (index < this.tracks.length)
return this.tracks[index];
spine.Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null);
spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);
this.tracks.length = index + 1;
return null;
};

File diff suppressed because one or more lines are too long

View File

@ -1755,7 +1755,7 @@ var spine;
AnimationState.prototype.expandToIndex = function (index) {
if (index < this.tracks.length)
return this.tracks[index];
spine.Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null);
spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);
this.tracks.length = index + 1;
return null;
};

File diff suppressed because one or more lines are too long

View File

@ -1755,7 +1755,7 @@ var spine;
AnimationState.prototype.expandToIndex = function (index) {
if (index < this.tracks.length)
return this.tracks[index];
spine.Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null);
spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);
this.tracks.length = index + 1;
return null;
};

File diff suppressed because one or more lines are too long

View File

@ -1755,7 +1755,7 @@ var spine;
AnimationState.prototype.expandToIndex = function (index) {
if (index < this.tracks.length)
return this.tracks[index];
spine.Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null);
spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);
this.tracks.length = index + 1;
return null;
};

File diff suppressed because one or more lines are too long

View File

@ -1755,7 +1755,7 @@ var spine;
AnimationState.prototype.expandToIndex = function (index) {
if (index < this.tracks.length)
return this.tracks[index];
spine.Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null);
spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);
this.tracks.length = index + 1;
return null;
};

File diff suppressed because one or more lines are too long

View File

@ -527,7 +527,7 @@ module spine {
expandToIndex (index: number) {
if (index < this.tracks.length) return this.tracks[index];
Utils.ensureArrayCapacity(this.tracks, index - this.tracks.length + 1, null);
Utils.ensureArrayCapacity(this.tracks, index + 1, null);
this.tracks.length = index + 1;
return null;
}