Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

Commit

Permalink
move fast transition to css
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbender committed Apr 25, 2018
1 parent 66a2b01 commit bd00c68
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/responsive-carousel.drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
// add the fast transition class to make transitions out of a drag quick
// remove any no-transition class so the transition out of the drag can work
$both
.addClass("fast")
.addClass("fast-transition")
.removeClass("no-transition");

if( $( e.target ).attr( "data-transition" ) === "slide" ){
Expand All @@ -93,7 +93,7 @@
$( e.target ).trigger( "goto." + pluginName, newSlide ? $next : $current );

// remove the fast transition class so that other transitions can be slow
$both.removeClass("fast");
$both.removeClass("fast-transition");

// do the post transition cleanup to make sure that the state in the
// component is sane for future transitions and navigation
Expand Down
12 changes: 10 additions & 2 deletions src/responsive-carousel.slide.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,13 @@
left: 0;
}
.carousel-item.no-transition {
transition: none !important;
}
transition: none !important;
}
.carousel-slide .carousel-item.fast-transition,
.carousel-slide-reverse .carousel-item.fast-transition {
-webkit-transition: left .1s ease;
-moz-transition: left .1s ease;
-ms-transition: left .1s ease;
-o-transition: left .1s ease;
transition: left .1s ease;
}
8 changes: 0 additions & 8 deletions test/functional/slide-two.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@
transition: left 2s ease;
}

.carousel-item.fast {
-webkit-transition: left .1s ease;
-moz-transition: left .1s ease;
-ms-transition: left .1s ease;
-o-transition: left .1s ease;
transition: left .1s ease;
}

.carousel-slide-reverse .carousel-item {
-webkit-transition: left 2s ease;
-moz-transition: left 2s ease;
Expand Down

0 comments on commit bd00c68

Please sign in to comment.