Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
b7398bc9
Commit
b7398bc9
authored
Nov 15, 2014
by
Chris Rebert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
honor wrap option in Carousel.getItemForDirection; fixes #15144
parent
8008fe70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
js/carousel.js
js/carousel.js
+4
-7
No files found.
js/carousel.js
View file @
b7398bc9
...
...
@@ -70,8 +70,11 @@
}
Carousel
.
prototype
.
getItemForDirection
=
function
(
direction
,
active
)
{
var
delta
=
direction
==
'
prev
'
?
-
1
:
1
var
activeIndex
=
this
.
getItemIndex
(
active
)
var
willWrap
=
(
direction
==
'
prev
'
&&
activeIndex
===
0
)
||
(
direction
==
'
next
'
&&
activeIndex
==
(
this
.
$items
.
length
-
1
))
if
(
willWrap
&&
!
this
.
options
.
wrap
)
return
active
var
delta
=
direction
==
'
prev
'
?
-
1
:
1
var
itemIndex
=
(
activeIndex
+
delta
)
%
this
.
$items
.
length
return
this
.
$items
.
eq
(
itemIndex
)
}
...
...
@@ -116,14 +119,8 @@
var
$next
=
next
||
this
.
getItemForDirection
(
type
,
$active
)
var
isCycling
=
this
.
interval
var
direction
=
type
==
'
next
'
?
'
left
'
:
'
right
'
var
fallback
=
type
==
'
next
'
?
'
first
'
:
'
last
'
var
that
=
this
if
(
!
$next
.
length
)
{
if
(
!
this
.
options
.
wrap
)
return
$next
=
this
.
$element
.
find
(
'
.item
'
)[
fallback
]()
}
if
(
$next
.
hasClass
(
'
active
'
))
return
(
this
.
sliding
=
false
)
var
relatedTarget
=
$next
[
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment