Skip to content
This repository was archived by the owner on May 10, 2018. It is now read-only.

Added 2 small features: Docking to an element and autohiding the indicators #176

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

doukasd
Copy link

@doukasd doukasd commented Jun 24, 2014

First of all, big thanks for this component, saved me a ton of time and was almost exactly what I was looking for.

For my needs, the carousel needed to be inside a container with a hidden overflow, therefore the indicators were getting lost as they are at the bottom and just adding a padding would not work as the inner size of the container was not fixed. So I added an optional attribute that allows you to specify an element to dock the indicator to.

Also added the option to autohide the indicators; that is to show them only if there are only 2 or more slides in the carousel.

I think the changes are pretty unobtrusive (sorry changing the background color by 0.2 :) )

It is all documented in the readme and the code if quite straightforward and documented. You can see how it all works here: http://doukasd.com/

Cheers,
Dimitris

@revolunet
Copy link
Owner

Thanks for reporting and sorry for the delay.

Do you see any real world use case for the auto-hide attribute to be observed ? i guess it could be a simple boolean that conditionally adds (or not) the indicator when initializing the carousel ?

@doukasd
Copy link
Author

doukasd commented Aug 7, 2014

The use that I saw was not to show the indicators when there is only 1 image in the carousel. You can see it in action on my website (http://doukasd.com/) for projects that only have one thumbnail the indicators are not shown.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants