-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Wong Ho Chi Mark
committed
Dec 26, 2015
1 parent
af66136
commit 7ae3c41
Showing
4 changed files
with
35 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "angular-slick-carousel", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"homepage": "https://github.com/devmark/angular-slick-carousel", | ||
"authors": [ | ||
"DevMark <[email protected]>" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* angular-slick-carousel | ||
* DevMark <[email protected]> | ||
* https://github.com/devmark/angular-slick-carousel | ||
* Version: 3.1.3 - 2015-11-25T09:13:43.590Z | ||
* Version: 3.1.4 - 2015-12-26T03:01:55.410Z | ||
* License: MIT | ||
*/ | ||
|
||
|
@@ -92,16 +92,16 @@ angular | |
centerPadding: scope.centerPadding || '50px', | ||
cssEase: scope.cssEase || 'ease', | ||
customPaging: attr.customPaging ? function (slick, index) { | ||
return scope.customPaging({ slick: slick, index: index }); | ||
return scope.customPaging({slick: slick, index: index}); | ||
} : void 0, | ||
dots: attr.dots || scope.dots === 'true', | ||
dots: scope.dots === 'true', | ||
draggable: scope.draggable !== 'false', | ||
fade: scope.fade === 'true', | ||
focusOnSelect: scope.focusOnSelect === 'true', | ||
easing: scope.easing || 'linear', | ||
edgeFriction: scope.edgeFriction || 0.15, | ||
infinite: scope.infinite !== 'false', | ||
initialSlide: scope.initialSlide || 0, | ||
initialSlide: parseInt(scope.initialSlide) || 0, | ||
lazyLoad: scope.lazyLoad || 'ondemand', | ||
mobileFirst: scope.mobileFirst === 'true', | ||
pauseOnHover: scope.pauseOnHover !== 'false', | ||
|
@@ -143,15 +143,15 @@ angular | |
var slickness = angular.element(element); | ||
|
||
if (angular.element(element).hasClass('slick-initialized')) { | ||
if(options.enabled) { | ||
if (options.enabled) { | ||
return slickness.slick('getSlick'); | ||
} else { | ||
destroy(); | ||
} | ||
} else { | ||
angular.element(element).css('display', 'block'); | ||
|
||
if(!options.enabled) { | ||
if (!options.enabled) { | ||
return; | ||
} | ||
// Event | ||
|
@@ -163,7 +163,7 @@ angular | |
return slick.slideHandler(currentIndex); | ||
} | ||
}); | ||
$timeout(function() { | ||
$timeout(function () { | ||
slickness.slick(options); | ||
}); | ||
} | ||
|
@@ -184,46 +184,62 @@ angular | |
slickness.on('afterChange', function (event, slick, currentSlide, nextSlide) { | ||
currentIndex = currentSlide; | ||
if (typeof options.event.afterChange !== 'undefined') { | ||
options.event.afterChange(event, slick, currentSlide, nextSlide); | ||
scope.$apply(function () { | ||
options.event.afterChange(event, slick, currentSlide, nextSlide); | ||
}); | ||
} | ||
}); | ||
|
||
slickness.on('beforeChange', function (event, slick, currentSlide, nextSlide) { | ||
if (typeof options.event.beforeChange !== 'undefined') { | ||
options.event.beforeChange(event, slick, currentSlide, nextSlide); | ||
scope.$apply(function () { | ||
options.event.beforeChange(event, slick, currentSlide, nextSlide); | ||
}); | ||
} | ||
}); | ||
|
||
slickness.on('reInit', function (event, slick) { | ||
if (typeof options.event.reInit !== 'undefined') { | ||
options.event.reInit(event, slick); | ||
scope.$apply(function () { | ||
options.event.reInit(event, slick); | ||
}); | ||
} | ||
}); | ||
|
||
if (typeof options.event.breakpoint !== 'undefined') { | ||
slickness.on('breakpoint', function (event, slick, breakpoint) { | ||
options.event.breakpoint(event, slick, breakpoint); | ||
scope.$apply(function () { | ||
options.event.breakpoint(event, slick, breakpoint); | ||
}); | ||
}); | ||
} | ||
if (typeof options.event.destroy !== 'undefined') { | ||
slickness.on('destroy', function (event, slick) { | ||
options.event.destroy(event, slick); | ||
scope.$apply(function () { | ||
options.event.destroy(event, slick); | ||
}); | ||
}); | ||
} | ||
if (typeof options.event.edge !== 'undefined') { | ||
slickness.on('edge', function (event, slick, direction) { | ||
options.event.edge(event, slick, direction); | ||
scope.$apply(function () { | ||
options.event.edge(event, slick, direction); | ||
}); | ||
}); | ||
} | ||
|
||
if (typeof options.event.setPosition !== 'undefined') { | ||
slickness.on('setPosition', function (event, slick) { | ||
options.event.setPosition(event, slick); | ||
scope.$apply(function () { | ||
options.event.setPosition(event, slick); | ||
}); | ||
}); | ||
} | ||
if (typeof options.event.swipe !== 'undefined') { | ||
slickness.on('swipe', function (event, slick, direction) { | ||
options.event.swipe(event, slick, direction); | ||
scope.$apply(function () { | ||
options.event.swipe(event, slick, direction); | ||
}); | ||
}); | ||
} | ||
}; | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters