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

add shift-click in morpheme view #211

Closed patkaiist closed 4 months ago

patkaiist commented 4 months ago

Added shift-click to GLOSSES.markID() to allow easier selection of ranges.

patkaiist commented 4 months ago

The reason the variables are declared outside the scope of the function is so that it can be set and re-set. rangeEnd could be within the scope since it's only used at the time that it does the final iterative highlighting, but I've put it with rangeStart just for human readability and keeping track. Then the reason they are right next to the function was strictly so that you'd see what I added all in one place. These could go anywhere; it's just a matter of eventually refactoring (should that happen down the road) and then not having stray unused functions/variables that get left behind.

And of course here let and var are functionally equivalent. In a lot of modern code let and const are being used in place of var, and it's just my habit to use those rather than var.

LinguList commented 4 months ago

Many thanks!