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:
Ross Holdway
2017-04-02 16:30:18 +01:00
committed by Manu MA
parent a0554573de
commit 33be36d070

View File

@ -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);