-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat(carousel): hide prev/next if not loop and indexes at bounds #5708
Conversation
@@ -1,10 +1,10 @@ | |||
<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()"> | |||
<div class="carousel-inner" ng-transclude></div> | |||
<a role="button" href class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1"> | |||
<a role="button" href class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1" ng-hide="active === 0 && noWrap()"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes add two extra watches per slide - can you please investigate combining the ng-show/ng-hide?
I'd prefer ng-if over ng-hide/show. We also need to consider, does it make for a jarring experience with elements being removed rather than just disabling them? |
Also a fan of disable, that way users can choose the more jarring experience if they want with CSS. Since |
@plondon are there accessibility issues with doing that or is that the preferred mechanism? IIRC, using the |
These need to be condensed into a single function for the show/hide - too much logic in the view here. |
@icfantv |
ac24557
to
e70f76b
Compare
Since previous and next buttons are "disabled" by the noWrap logic I think we can leave them as anchor tag's. Instead of I'll squash these commits if you all agree with this approach. |
e70f76b
to
f2e8730
Compare
This looks solid to me - anyone else have thoughts? |
f2e8730
to
fb94d95
Compare
LGTM |
No description provided.