Skip to content

Commit

Permalink
Bug Fix: perMove was not updated according to the breakpoints option(#8
Browse files Browse the repository at this point in the history
…).
  • Loading branch information
NaotoshiFujita committed Jan 9, 2020
1 parent 6c9e199 commit 64eafd2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
5 changes: 3 additions & 2 deletions dist/js/splide.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Splide.js
* Version : 1.3.2
* Version : 1.3.3
* License : MIT
* Copyright: 2019 Naotoshi Fujita
*/
Expand Down Expand Up @@ -4230,11 +4230,12 @@ var SIZE = 40;
*/

function listen() {
var perMove = Splide.options.perMove;
subscribe(arrows.prev, 'click', function () {
var perMove = Splide.options.perMove;
Splide.go(perMove ? "-" + perMove : '<');
});
subscribe(arrows.next, 'click', function () {
var perMove = Splide.options.perMove;
Splide.go(perMove ? "+" + perMove : '>');
});
}
Expand Down
4 changes: 2 additions & 2 deletions dist/js/splide.min.js

Large diffs are not rendered by default.

Binary file modified dist/js/splide.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@splidejs/splide",
"version": "1.3.2",
"version": "1.3.3",
"description": "Splide is a lightweight and powerful slider without any dependencies.",
"author": "Naotoshi Fujita",
"license": "MIT",
Expand Down
12 changes: 9 additions & 3 deletions src/js/components/arrows/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,15 @@ export default ( Splide, Components, name ) => {
* Subscribe click events.
*/
function listen() {
const perMove = Splide.options.perMove;
subscribe( arrows.prev, 'click', () => { Splide.go( perMove ? `-${ perMove }` : '<' ) } );
subscribe( arrows.next, 'click', () => { Splide.go( perMove ? `+${ perMove }` : '>' ) } );
subscribe( arrows.prev, 'click', () => {
const perMove = Splide.options.perMove;
Splide.go( perMove ? `-${ perMove }` : '<' );
} );

subscribe( arrows.next, 'click', () => {
const perMove = Splide.options.perMove;
Splide.go( perMove ? `+${ perMove }` : '>' );
} );
}

/**
Expand Down

0 comments on commit 64eafd2

Please sign in to comment.