moving more of the logic to slide_model
With more of the logic coming to the rust models, I can start to make compile time guarantees.
This commit is contained in:
parent
8c7f2d794f
commit
8463af6ad9
3 changed files with 21 additions and 34 deletions
|
@ -249,22 +249,6 @@ Controls.Page {
|
|||
console.log("text: " + item.text);
|
||||
console.log("slide_index: " + item.slideIndex);
|
||||
console.log("slide_count: " + item.imageCount);
|
||||
/* if (item.html) { */
|
||||
/* let index = item.slideIndex; */
|
||||
/* let count = item.imageCount; */
|
||||
/* if (index > 0 && index < count - 1) { */
|
||||
/* console.log("I should advance revealy"); */
|
||||
/* if (isMoveDown) */
|
||||
/* presentation.revealNext() */
|
||||
/* else */
|
||||
/* presentation.revealPrev() */
|
||||
/* return */
|
||||
/* } */
|
||||
/* } */
|
||||
|
||||
/* presentation.stopVideo(); */
|
||||
/* pWindow.stopVideo(); */
|
||||
/* presentation.itemType = item.type; */
|
||||
console.log("Time to start changing");
|
||||
|
||||
ServiceItemModel.activate(currentServiceItem);
|
||||
|
|
|
@ -481,9 +481,7 @@ FocusScope {
|
|||
|
||||
function nextSlideAction() {
|
||||
keyHandler.forceActiveFocus();
|
||||
if (SlideModel.next()) {
|
||||
console.log("VICTORY")
|
||||
}
|
||||
SlideModel.next()
|
||||
/* const nextSlideIdx = SlideObject.html && (SlideObject.innerSlideIndex + 1 < SlideObject.slideSize) ? currentSlide : currentSlide + 1; */
|
||||
/* const nextSlide = SlideModel.getItem(nextSlideIdx); */
|
||||
/* if (nextSlideIdx > totalSlides || nextSlideIdx < 0) */
|
||||
|
@ -508,19 +506,7 @@ FocusScope {
|
|||
|
||||
function previousSlideAction() {
|
||||
keyHandler.forceActiveFocus();
|
||||
const prevSlideIdx = currentSlide - 1;
|
||||
const prevSlide = SlideModel.getItem(prevSlideIdx);
|
||||
if (prevSlideIdx > totalSlides || prevSlideIdx < 0)
|
||||
return;
|
||||
console.log("currentServiceItem " + currentServiceItem);
|
||||
console.log("totalSlides " + totalSlides);
|
||||
console.log("currentSlide " + currentSlide);
|
||||
console.log("prevSlideIdx " + prevSlideIdx);
|
||||
/* changeSlide(prevSlideIdx); */
|
||||
if (SlideObject.previous(prevSlide)) {
|
||||
currentSlide = prevSlideIdx;
|
||||
currentServiceItem = prevSlide.serviceItemId;
|
||||
}
|
||||
SlideModel.prev()
|
||||
}
|
||||
|
||||
function previousSlide() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue