mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
fix(slides): negative number indicates position starting at end (#10997)
* fix(slides): negative number indicates position starting at end * refactor(slides): use var instead of let
This commit is contained in:
@ -63,8 +63,9 @@ export function updatePaginationClasses(s: Slides) {
|
||||
|
||||
// Types
|
||||
if (s.paginationType === 'bullets' && s._bullets) {
|
||||
var selector = current + ( current < 0 ? s._bullets.length : 0 );
|
||||
for (var i = 0; i < s._bullets.length; i++) {
|
||||
if (i === current) {
|
||||
if (i === selector) {
|
||||
addClass(s._bullets[i], CLS.bulletActive);
|
||||
} else {
|
||||
removeClass(s._bullets[i], CLS.bulletActive);
|
||||
|
Reference in New Issue
Block a user