attempting to switch the next button to using slibe_object for a

cleaner interaction
This commit is contained in:
Chris Cochrun 2024-01-17 09:46:23 -06:00
parent 8c31678b4e
commit 791bcc146e
4 changed files with 130 additions and 39 deletions

View file

@ -465,17 +465,22 @@ FocusScope {
function nextSlideAction() {
keyHandler.forceActiveFocus();
console.log(currentServiceItem);
console.log(totalSlides);
console.log(imageBackground);
const nextSlideIdx = currentSlide + 1;
if (!SlideObject.imageBackground.endsWith(".html") &&
(nextSlideIdx > totalSlides || nextSlideIdx < 0))
return;
const nextSlide = SlideModel.getItem(nextSlideIdx);
/* if (!SlideObject.imageBackground.endsWith(".html") && */
/* (nextSlideIdx > totalSlides || nextSlideIdx < 0)) */
/* return; */
console.log("currentServiceItem " + currentServiceItem);
console.log("totalSlides " + totalSlides);
console.log("currentSlide " + currentSlide);
console.log("nextSlideIdx " + nextSlideIdx);
changeSlide(nextSlideIdx);
for (var prop in nextSlide)
console.log(prop += " (" + typeof(nextSlide[prop]) + ") = " + nextSlide[prop]);
/* changeSlide(nextSlideIdx); */
if (SlideObject.next(nextSlide)) {
currentSlide = nextSlideIdx;
currentServiceItem = nextSlide.serviceItemId;
}
}
function nextSlide() {