Skip to content

Commit d30c35f

Browse files
committed
fix: Fixed error when registered tweens are not completed in order
1 parent 2b788cd commit d30c35f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

dist/tween.amd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ define(['exports'], (function (exports) { 'use strict';
302302
var prevCallback = tween.getCompleteCallback();
303303
tween.onComplete(function () {
304304
prevCallback === null || prevCallback === void 0 ? void 0 : prevCallback(tween);
305-
// Since _isPlaying is updated to false after the onComplete callback finishes, the final tween is omitted from the check to determine if all animations have completed
305+
// After the onComplete callback completes, _isPlaying is updated to false, so if the total number of completed tweens is -1, then they are all complete.
306306
var completedGroup = group.filter(function (tween) { return !tween.isPlaying(); });
307307
if (completedGroup.length === group.length - 1)
308308
callback(group);

dist/tween.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ var Group = /** @class */ (function () {
304304
var prevCallback = tween.getCompleteCallback();
305305
tween.onComplete(function () {
306306
prevCallback === null || prevCallback === void 0 ? void 0 : prevCallback(tween);
307-
// Since _isPlaying is updated to false after the onComplete callback finishes, the final tween is omitted from the check to determine if all animations have completed
307+
// After the onComplete callback completes, _isPlaying is updated to false, so if the total number of completed tweens is -1, then they are all complete.
308308
var completedGroup = group.filter(function (tween) { return !tween.isPlaying(); });
309309
if (completedGroup.length === group.length - 1)
310310
callback(group);

dist/tween.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ var Group = /** @class */ (function () {
300300
var prevCallback = tween.getCompleteCallback();
301301
tween.onComplete(function () {
302302
prevCallback === null || prevCallback === void 0 ? void 0 : prevCallback(tween);
303-
// Since _isPlaying is updated to false after the onComplete callback finishes, the final tween is omitted from the check to determine if all animations have completed
303+
// After the onComplete callback completes, _isPlaying is updated to false, so if the total number of completed tweens is -1, then they are all complete.
304304
var completedGroup = group.filter(function (tween) { return !tween.isPlaying(); });
305305
if (completedGroup.length === group.length - 1)
306306
callback(group);

dist/tween.umd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@
306306
var prevCallback = tween.getCompleteCallback();
307307
tween.onComplete(function () {
308308
prevCallback === null || prevCallback === void 0 ? void 0 : prevCallback(tween);
309-
// Since _isPlaying is updated to false after the onComplete callback finishes, the final tween is omitted from the check to determine if all animations have completed
309+
// After the onComplete callback completes, _isPlaying is updated to false, so if the total number of completed tweens is -1, then they are all complete.
310310
var completedGroup = group.filter(function (tween) { return !tween.isPlaying(); });
311311
if (completedGroup.length === group.length - 1)
312312
callback(group);

0 commit comments

Comments
 (0)