* Initializes some parameters. * Needs to check the number of slides since the current index may be out of the range after refresh. * The process order must be Elements -> Controller -> Move.
()
| 97 | * The process order must be Elements -> Controller -> Move. |
| 98 | */ |
| 99 | function init(): void { |
| 100 | slideCount = getLength( true ); |
| 101 | perMove = options.perMove; |
| 102 | perPage = options.perPage; |
| 103 | endIndex = getEnd(); |
| 104 | |
| 105 | const index = clamp( currIndex, 0, omitEnd ? endIndex : slideCount - 1 ); |
| 106 | |
| 107 | if ( index !== currIndex ) { |
| 108 | currIndex = index; |
| 109 | Move.reposition(); |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Called when the viewport width is changed. |
no test coverage detected
searching dependent graphs…