@hkdigital/lib-core 0.5.60 → 0.5.62
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,29 @@ 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
|
+
// Clear any pending slide since we're already going where the user wants
|
|
295
|
+
this.pendingSlideName = null;
|
|
294
296
|
return;
|
|
295
297
|
}
|
|
296
298
|
|
|
297
|
-
this
|
|
299
|
+
// Can't transition if we're idle and already on this slide
|
|
300
|
+
if (slide.name === this.currentSlideName && !this.busy) {
|
|
301
|
+
console.debug(`gotoSlide cannot transition to current slide [${slide.name}]`);
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
298
304
|
|
|
305
|
+
// If busy, queue this slide for later without modifying nextSlideName
|
|
299
306
|
if (this.busy) {
|
|
300
307
|
this.pendingSlideName = slide.name;
|
|
301
308
|
return;
|
|
302
309
|
}
|
|
303
310
|
|
|
311
|
+
// Now we're actually starting a new transition
|
|
312
|
+
this.nextSlideName = slide.name;
|
|
313
|
+
|
|
304
314
|
this.#callOnBeforeListeners();
|
|
305
315
|
|
|
306
316
|
this.slideLoadingPromise = null;
|
|
@@ -412,8 +422,6 @@ export class PresenterState {
|
|
|
412
422
|
// Check if there's a pending slide transition
|
|
413
423
|
if (this.pendingSlideName) {
|
|
414
424
|
const pendingName = this.pendingSlideName;
|
|
415
|
-
|
|
416
|
-
this.nextSlideName = pendingName;
|
|
417
425
|
this.pendingSlideName = null;
|
|
418
426
|
|
|
419
427
|
untrack(() => {
|