Commit c2abfc0a authored by Heinrich Fenkart's avatar Heinrich Fenkart

grunt

parent 6503cb08
This diff was suppressed by a .gitattributes entry.
...@@ -359,8 +359,11 @@ if (typeof jQuery === 'undefined') { ...@@ -359,8 +359,11 @@ if (typeof jQuery === 'undefined') {
} }
Carousel.prototype.getItemForDirection = function (direction, active) { Carousel.prototype.getItemForDirection = function (direction, active) {
var delta = direction == 'prev' ? -1 : 1
var activeIndex = this.getItemIndex(active) 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 var itemIndex = (activeIndex + delta) % this.$items.length
return this.$items.eq(itemIndex) return this.$items.eq(itemIndex)
} }
...@@ -405,14 +408,8 @@ if (typeof jQuery === 'undefined') { ...@@ -405,14 +408,8 @@ if (typeof jQuery === 'undefined') {
var $next = next || this.getItemForDirection(type, $active) var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right' var direction = type == 'next' ? 'left' : 'right'
var fallback = type == 'next' ? 'first' : 'last'
var that = this 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) if ($next.hasClass('active')) return (this.sliding = false)
var relatedTarget = $next[0] var relatedTarget = $next[0]
...@@ -576,7 +573,7 @@ if (typeof jQuery === 'undefined') { ...@@ -576,7 +573,7 @@ if (typeof jQuery === 'undefined') {
if (this.transitioning || this.$element.hasClass('in')) return if (this.transitioning || this.$element.hasClass('in')) return
var activesData var activesData
var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing') var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
if (actives && actives.length) { if (actives && actives.length) {
activesData = actives.data('bs.collapse') activesData = actives.data('bs.collapse')
......
This diff is collapsed.
This diff is collapsed.
This diff was suppressed by a .gitattributes entry.
...@@ -359,8 +359,11 @@ if (typeof jQuery === 'undefined') { ...@@ -359,8 +359,11 @@ if (typeof jQuery === 'undefined') {
} }
Carousel.prototype.getItemForDirection = function (direction, active) { Carousel.prototype.getItemForDirection = function (direction, active) {
var delta = direction == 'prev' ? -1 : 1
var activeIndex = this.getItemIndex(active) 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 var itemIndex = (activeIndex + delta) % this.$items.length
return this.$items.eq(itemIndex) return this.$items.eq(itemIndex)
} }
...@@ -405,14 +408,8 @@ if (typeof jQuery === 'undefined') { ...@@ -405,14 +408,8 @@ if (typeof jQuery === 'undefined') {
var $next = next || this.getItemForDirection(type, $active) var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right' var direction = type == 'next' ? 'left' : 'right'
var fallback = type == 'next' ? 'first' : 'last'
var that = this 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) if ($next.hasClass('active')) return (this.sliding = false)
var relatedTarget = $next[0] var relatedTarget = $next[0]
...@@ -576,7 +573,7 @@ if (typeof jQuery === 'undefined') { ...@@ -576,7 +573,7 @@ if (typeof jQuery === 'undefined') {
if (this.transitioning || this.$element.hasClass('in')) return if (this.transitioning || this.$element.hasClass('in')) return
var activesData var activesData
var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing') var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
if (actives && actives.length) { if (actives && actives.length) {
activesData = actives.data('bs.collapse') activesData = actives.data('bs.collapse')
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment