add slides, "appear" effect, video, image hover, update notes

This commit is contained in:
Jeremy Likness
2019-11-25 15:20:12 -08:00
parent bff4f64d57
commit a4ae68dfb8
21 changed files with 116 additions and 19 deletions

View File

@@ -141,10 +141,27 @@ export class Navigator extends HTMLElement {
}
}
/**
* Check for in-slide appearances on navigation
* @returns {boolean} True if an element was revealed
*/
checkForAppears() {
const host = this.querySelector("div");
const appear = host.querySelectorAll(".appear");
if (appear.length) {
appear[0].classList.remove("appear");
return true;
}
return false;
}
/**
* Advance to next slide, if it exists. Applies animation if transition is specified
*/
next() {
if (this.checkForAppears()) {
return;
}
if (this.hasNext) {
if (this.currentSlide.transition !== null) {
this._animator.beginAnimation(