Closed borkor closed 13 years ago
Hi, borkor. I’m labeling this as a feature request. It shouldn’t be too difficult to implement, but I don’t have a whole lot of time this week. Perhaps in the coming weeks. In the meantime, if you do come up with a solution, please don’t hesitate to share it here (either post the change here or fork, change and send a pull request when you’re done).
Thank you for the suggestion!
Here is it:
function movePosition(step) {
if (options.scrollJumpPosition ||
(!options.scrollJumpPosition && !((step < 0 && active == 0) ||
(step > 0 && active == listItems.size() - 1)) )) {
active += step;
if (active < 0) {
active = listItems.size() - 1;
} else if (active >= listItems.size()) {
active = 0;
}
}
}
I've also added the new option scrollJumpPosition, default is true.
Thank you for your contribution, borkor!
I’ll implement this in the next version.
I finally got around to merging your branch, borkor. Thanks again!
Maybe there is a an option to prevent this anoying behaviour, but I just cant find it.