Skip to content

Commit

Permalink
fix: Bound is not working when using dots or arrows glidejs#372 (glid…
Browse files Browse the repository at this point in the history
…ejs#384)

Co-authored-by: Jędrzej Chałubek <[email protected]>
  • Loading branch information
gautamz07 and jedrzejchalubek authored Nov 22, 2021
1 parent ded7e74 commit 05b9758
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ export default function (Glide, Components, Events) {
// While direction is `=` we want jump to
// a specified index described in steps.
if (direction === '=') {
// Check if bound is true,
// as we want to avoid whitespaces.
if( Glide.settings.bound && toInt(steps) > length ) {
Glide.index = length
return
}

Glide.index = steps

return
Expand Down

0 comments on commit 05b9758

Please sign in to comment.