mirror of
https://github.com/JeremyLikness/vanillajs-deck
synced 2025-12-15 10:43:34 +00:00
Tweak web component, add new slide, code fixes
This commit is contained in:
@@ -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 {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user