Tweak web component, add new slide, code fixes

This commit is contained in:
Jeremy Likness
2019-12-02 15:18:17 -08:00
parent 2ea7049dd2
commit 5831ecc10e
14 changed files with 37 additions and 21 deletions

View File

@@ -55,7 +55,7 @@ export class DataBinding {
* @param {Observable} observable The observable instance to bind to
*/
bindValue(input, observable) {
let initialValue = observable.value;
const initialValue = observable.value;
input.value = initialValue;
observable.subscribe(() => input.value = observable.value);
/**
@@ -123,4 +123,3 @@ export class DataBinding {
});
}
}

View File

@@ -43,7 +43,7 @@ export class Navigator extends HTMLElement {
if (this._route !== this._router.getRoute()) {
this._route = this._router.getRoute();
if (this._route) {
var slide = parseInt(this._route) - 1;
const slide = parseInt(this._route) - 1;
this.jumpTo(slide);
}
}

View File

@@ -51,7 +51,7 @@ export class Slide {
this._transition = null;
}
/** @type{NodeListOf<HTMLElement>} */
const hasNext = this._html.querySelectorAll("nextslide");
const hasNext = this._html.querySelectorAll("next-slide");
if (hasNext.length > 0) {
/**
* The name of the next slide to load