Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) Add home/end key support #179

Merged
merged 1 commit into from
Sep 16, 2018
Merged

(feat) Add home/end key support #179

merged 1 commit into from
Sep 16, 2018

Conversation

BartDelrue
Copy link
Contributor

@BartDelrue BartDelrue commented May 19, 2018

Pressing the home or end key takes you to the first or last image of the opened gallery.

Issue #180

Copy link

@Jeroen005 Jeroen005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good :)

@BartDelrue BartDelrue mentioned this pull request Jul 2, 2018
@meirege
Copy link

meirege commented Jul 6, 2018

We could really use this for an upcoming project at our firm. 👍

@@ -598,6 +604,22 @@
return show(currentIndex - 1);
}

// Return false at the left end of the gallery
function showFirstImage(event) {
if (event) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the if? Is there a case where event is undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently no.
I included it in case you'd want to expose this function later on, cfr shownext etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you want it gone ;)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be merged please? We could really use this feature...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, sorry for the delay

@feimosi feimosi merged commit 8d038e3 into feimosi:dev Sep 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants