@hkdigital/lib-core 0.5.60 → 0.5.61
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.
|
@@ -288,19 +288,27 @@ export class PresenterState {
|
|
|
288
288
|
throw new Error('Not configured yet');
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
if
|
|
292
|
-
|
|
293
|
-
console.
|
|
291
|
+
// Can't transition if we're already transitioning to this slide
|
|
292
|
+
if (slide.name === this.nextSlideName) {
|
|
293
|
+
console.debug(`gotoSlide already transitioning to slide [${slide.name}]`);
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
this
|
|
297
|
+
// Can't transition if we're idle and already on this slide
|
|
298
|
+
if (slide.name === this.currentSlideName && !this.busy) {
|
|
299
|
+
console.debug(`gotoSlide cannot transition to current slide [${slide.name}]`);
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
298
302
|
|
|
303
|
+
// If busy, queue this slide for later without modifying nextSlideName
|
|
299
304
|
if (this.busy) {
|
|
300
305
|
this.pendingSlideName = slide.name;
|
|
301
306
|
return;
|
|
302
307
|
}
|
|
303
308
|
|
|
309
|
+
// Now we're actually starting a new transition
|
|
310
|
+
this.nextSlideName = slide.name;
|
|
311
|
+
|
|
304
312
|
this.#callOnBeforeListeners();
|
|
305
313
|
|
|
306
314
|
this.slideLoadingPromise = null;
|
|
@@ -412,8 +420,6 @@ export class PresenterState {
|
|
|
412
420
|
// Check if there's a pending slide transition
|
|
413
421
|
if (this.pendingSlideName) {
|
|
414
422
|
const pendingName = this.pendingSlideName;
|
|
415
|
-
|
|
416
|
-
this.nextSlideName = pendingName;
|
|
417
423
|
this.pendingSlideName = null;
|
|
418
424
|
|
|
419
425
|
untrack(() => {
|