[ts] Fix for clearTracks, see #805

This commit is contained in:
badlogic 2016-12-15 13:34:54 +01:00
parent fe33e912c6
commit 05ba66efe0
13 changed files with 34 additions and 20 deletions

View File

@ -1534,11 +1534,12 @@ var spine;
}
};
AnimationState.prototype.clearTracks = function () {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++)
this.clearTrack(i);
this.tracks.length = 0;
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.clearTrack = function (trackIndex) {
@ -1650,13 +1651,14 @@ var spine;
return entry;
};
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++) {
var current = this.tracks[i];
if (current != null)
this.setEmptyAnimation(current.trackIndex, mixDuration);
}
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.expandToIndex = function (index) {

File diff suppressed because one or more lines are too long

View File

@ -1534,11 +1534,12 @@ var spine;
}
};
AnimationState.prototype.clearTracks = function () {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++)
this.clearTrack(i);
this.tracks.length = 0;
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.clearTrack = function (trackIndex) {
@ -1650,13 +1651,14 @@ var spine;
return entry;
};
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++) {
var current = this.tracks[i];
if (current != null)
this.setEmptyAnimation(current.trackIndex, mixDuration);
}
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.expandToIndex = function (index) {

File diff suppressed because one or more lines are too long

View File

@ -1187,11 +1187,12 @@ var spine;
}
};
AnimationState.prototype.clearTracks = function () {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++)
this.clearTrack(i);
this.tracks.length = 0;
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.clearTrack = function (trackIndex) {
@ -1303,13 +1304,14 @@ var spine;
return entry;
};
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++) {
var current = this.tracks[i];
if (current != null)
this.setEmptyAnimation(current.trackIndex, mixDuration);
}
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.expandToIndex = function (index) {

File diff suppressed because one or more lines are too long

View File

@ -1187,11 +1187,12 @@ var spine;
}
};
AnimationState.prototype.clearTracks = function () {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++)
this.clearTrack(i);
this.tracks.length = 0;
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.clearTrack = function (trackIndex) {
@ -1303,13 +1304,14 @@ var spine;
return entry;
};
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++) {
var current = this.tracks[i];
if (current != null)
this.setEmptyAnimation(current.trackIndex, mixDuration);
}
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.expandToIndex = function (index) {

File diff suppressed because one or more lines are too long

View File

@ -1187,11 +1187,12 @@ var spine;
}
};
AnimationState.prototype.clearTracks = function () {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++)
this.clearTrack(i);
this.tracks.length = 0;
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.clearTrack = function (trackIndex) {
@ -1303,13 +1304,14 @@ var spine;
return entry;
};
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++) {
var current = this.tracks[i];
if (current != null)
this.setEmptyAnimation(current.trackIndex, mixDuration);
}
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.expandToIndex = function (index) {

File diff suppressed because one or more lines are too long

View File

@ -1187,11 +1187,12 @@ var spine;
}
};
AnimationState.prototype.clearTracks = function () {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++)
this.clearTrack(i);
this.tracks.length = 0;
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.clearTrack = function (trackIndex) {
@ -1303,13 +1304,14 @@ var spine;
return entry;
};
AnimationState.prototype.setEmptyAnimations = function (mixDuration) {
var oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (var i = 0, n = this.tracks.length; i < n; i++) {
var current = this.tracks[i];
if (current != null)
this.setEmptyAnimation(current.trackIndex, mixDuration);
}
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
};
AnimationState.prototype.expandToIndex = function (index) {

File diff suppressed because one or more lines are too long

View File

@ -307,11 +307,12 @@ module spine {
}
clearTracks () {
let oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (let i = 0, n = this.tracks.length; i < n; i++)
this.clearTrack(i);
this.tracks.length = 0;
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
}
@ -435,12 +436,13 @@ module spine {
}
setEmptyAnimations (mixDuration: number) {
let oldDrainDisabled = this.queue.drainDisabled;
this.queue.drainDisabled = true;
for (let i = 0, n = this.tracks.length; i < n; i++) {
let current = this.tracks[i];
if (current != null) this.setEmptyAnimation(current.trackIndex, mixDuration);
}
this.queue.drainDisabled = false;
this.queue.drainDisabled = oldDrainDisabled;
this.queue.drain();
}