| 1 | export class Navigation { |
| 2 | constructor(el) { |
| 3 | this.DOM = {el}; |
| 4 | this.DOM.ctrls = { |
| 5 | next: this.DOM.el.querySelector('.slides-nav__button--next'), |
| 6 | prev: this.DOM.el.querySelector('.slides-nav__button--prev') |
| 7 | }; |
| 8 | this.DOM.current = this.DOM.el.querySelector('.slides-nav__index-current'); |
| 9 | this.DOM.total = this.DOM.el.querySelector('.slides-nav__index-total'); |
| 10 | } |
| 11 | // updates the current value |
| 12 | updateCurrent(position) { |
| 13 | this.DOM.current.innerHTML = position < 10 ? `0${position+1}` : position; |
| 14 | } |
| 15 | } |
nothing calls this directly
no outgoing calls
no test coverage detected