@beyonk/svelte-carousel
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -628,3 +628,3 @@ (function (global, factory) { | ||
if (currentIndex < 0) currentIndex = pips.length + currentIndex; | ||
return currentIndex >= dotIndex*perPage && currentIndex < (dotIndex*perPage)+perPage | ||
return currentIndex >= dotIndex*currentPerPage && currentIndex < (dotIndex*currentPerPage)+currentPerPage | ||
} | ||
@@ -671,3 +671,3 @@ | ||
function click_handler({ i }) { | ||
return go(i*perPage); | ||
return go(i*currentPerPage); | ||
} | ||
@@ -690,7 +690,8 @@ | ||
let pips, totalDots; | ||
let pips, currentPerPage, totalDots; | ||
$$self.$$.update = ($$dirty = { controller: 1, perPage: 1 }) => { | ||
$$self.$$.update = ($$dirty = { controller: 1, perPage: 1, currentPerPage: 1 }) => { | ||
if ($$dirty.controller) { pips = controller ? controller.innerElements : []; } | ||
if ($$dirty.controller || $$dirty.perPage) { $$invalidate('totalDots', totalDots = controller ? Math.ceil(controller.innerElements.length / perPage) : []); } | ||
if ($$dirty.controller || $$dirty.perPage) { $$invalidate('currentPerPage', currentPerPage = controller ? controller.perPage : perPage); } | ||
if ($$dirty.controller || $$dirty.currentPerPage) { $$invalidate('totalDots', totalDots = controller ? Math.ceil(controller.innerElements.length / currentPerPage) : []); } | ||
}; | ||
@@ -718,2 +719,3 @@ | ||
resume, | ||
currentPerPage, | ||
totalDots, | ||
@@ -720,0 +722,0 @@ div0_binding, |
@@ -6,3 +6,3 @@ { | ||
"main": "dist/index.js", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"scripts": { | ||
@@ -9,0 +9,0 @@ "build": "rollup -c", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
82030
1416