@zcomponent/core 1.29.1-beta.1 → 1.29.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/animation/layer.js +5 -0
- package/package.json +1 -1
package/lib/animation/layer.js
CHANGED
|
@@ -175,6 +175,11 @@ export class Layer {
|
|
|
175
175
|
break;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
+
// If this clip is already in the queue (still fading out from a previous
|
|
179
|
+
// switch), remove that old entry before re-adding it, so the same LayerClip
|
|
180
|
+
// is never queued twice. Otherwise, when tick() later cleans up the old
|
|
181
|
+
// entry, it pauses the clip - which is now also the active one - freezing it.
|
|
182
|
+
this._queue = this._queue.filter(entry => entry === this._active || entry.layerClip !== layerClip);
|
|
178
183
|
const entry = this.queue(layerClip, {
|
|
179
184
|
...playOptions,
|
|
180
185
|
fade: playOptions?.fade !== undefined ? playOptions.fade : this._active === undefined || layerClip === undefined ? { time: 0, easing: null } : undefined,
|