Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
height: 100px;
border-bottom: 1px solid gray;
}

.swiper-container {
width: 100%;
height: 100%;
}

.swiper-slide-active > img {
width: 72px;
height: 72px;
}
.swiper-slide {
text-align: center;
font-size: 18px;
Expand All @@ -41,7 +44,7 @@
<div ng-app="demoApp">

<div class="myslides">
<ks-swiper-container loop="false" show-nav-buttons="false" slides-per-view="4" space-between="5" pagination-clickable="false">
<ks-swiper-container loop="false" show-nav-buttons="false" slides-per-view="4" space-between="5" pagination-clickable="false" centered="true">
<ks-swiper-slide ng-repeat="s in [1,2,3,4,5,6,7,8,9,10,11,12,13,14]">
<img ng-src="http://api.randomuser.me/portraits/thumb/men/{{s}}.jpg">
</ks-swiper-slide>
Expand Down Expand Up @@ -80,7 +83,7 @@

<script src="../bower_components/swiper/dist/js/swiper.js"></script>
<script src="../bower_components/angular/angular.js"></script>
<script src="../dist/angular-swiper.js"></script>
<script src="../src/angular-swiper.js"></script>

<script>
var module = angular.module('demoApp', ['ksSwiper']);
Expand All @@ -100,4 +103,4 @@

</body>

</html>
</html>
4 changes: 3 additions & 1 deletion src/angular-swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
showNavButtons: '=',
showScrollBar: '=',
loop: '=',
centered: '=',
autoplay: '=',
initialSlide: '=',
containerCls: '@',
Expand All @@ -61,7 +62,8 @@
direction: $scope.direction || 'horizontal',
loop: $scope.loop || false,
initialSlide: $scope.initialSlide || 0,
showNavButtons: false
showNavButtons: false,
centeredSlides: $scope.centered || false
};

if (!angular.isUndefined($scope.autoplay) && typeof $scope.autoplay === 'number') {
Expand Down