digling / edictor

JavaScript program for interactive viewing, manipulating, and editing of wordlists, represented in form of TSV files.
MIT License
6 stars 2 forks source link

Word list preview: No preview for 11th item in 11 item list #172

Closed seannyD closed 4 years ago

seannyD commented 4 years ago

If a concept set has 11 items, and the preview size is 10 items, the "next" button is not displayed, so you can't see the 11th item. Concept sets of 12 or more behave correctly, so this may be an off-by-one error. I suspect the problem is somewhere in this line:

https://github.com/digling/edictor/blob/9ea59a6c0fdd45a7364d7bee98f36e2cea3b3132/js/wordlist.js#L870

If I change the ">" to ">=", then I the next button appears "11-11". That solves the problem, except now the "START" button appears as well as a button showing "1-10". Perhaps the "START" label is a bit confusing anyway, so could be removed?

LinguList commented 4 years ago

Thanks, I'll check that!

LinguList commented 4 years ago

Thanks, I just found a way to fix it. One more step was needed, but if you go through concept machinery now, it will always start by zero, as if one pressed "start".