Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
added speed as option (fixes #28)
Browse files Browse the repository at this point in the history
  • Loading branch information
Suven committed Jan 18, 2017
1 parent 1f28657 commit c2335e5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addon/components/swiper-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ export default Component.extend({
options.freeMode = true;
}

if (this.get('speed')) {
options.speed = this.get('speed');
}

if (this.get('freeModeSticky')) {
options.freeModeSticky = true;
}
Expand Down
20 changes: 20 additions & 0 deletions tests/dummy/app/templates/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@
\{{/swiper-container}}
</pre>

<h3>Speedy Gonswiper</h3>

{{#swiper-container speed=100}}
{{#swiper-slide}}Slide 1{{/swiper-slide}}
{{#swiper-slide}}Slide 2{{/swiper-slide}}
{{#swiper-slide}}Slide 3{{/swiper-slide}}
{{#swiper-slide}}Slide 4{{/swiper-slide}}
{{#swiper-slide}}Slide 5{{/swiper-slide}}
{{/swiper-container}}

<pre>
\{{#swiper-container speed=100}}
\{{#swiper-slide}}Slide 1\{{/swiper-slide}}
\{{#swiper-slide}}Slide 2\{{/swiper-slide}}
\{{#swiper-slide}}Slide 3\{{/swiper-slide}}
\{{#swiper-slide}}Slide 4\{{/swiper-slide}}
\{{#swiper-slide}}Slide 5\{{/swiper-slide}}
\{{/swiper-container}}
</pre>

<h3>Infinite + Pagination + extra classes</h3>

{{#swiper-container pagination=true loop=true}}
Expand Down

0 comments on commit c2335e5

Please sign in to comment.