chrmoritz / Troxel

WebGL-based voxel viewer and editor
https://troxel.js.org/
GNU Lesser General Public License v3.0
58 stars 10 forks source link

Autocomplete in Trove Model List doesn't work with underscores #19

Closed Graphergrapher closed 9 years ago

Graphergrapher commented 9 years ago

Autocomplete seems to start after entering any 2 letters. But if you enter one letter followed by underscore (e.g. C_ which is common in blueprint names), autocomplete will never appear even if you type more (e.g. C_M_ice...).

Seems like autocomplete only works with alphanumeric characters. Both underscore and square brackets will stop autocomplete.

chrmoritz commented 9 years ago

This has something to do with the Bloodhound tokenizer defined in main.coffee. It splits every blueprint name at _, [ or ], but the query string only at every whitespace. I will most likely change the queryTokenizer to split after whitespaces and underscores and maybe add some keyword support for the datumTokenizer (e.g. add the npc keyword if we find C_M in the blueprint names...), which depends on how fast it is (we have a index of over 7000 blueprints!)

chrmoritz commented 9 years ago

This has been addressed in https://github.com/chrmoritz/Troxel/commit/9d3d7de10c6b7780fddfbc5b95bf9c5c355fb920#diff-4c41e390f5fc93f367e373c0a2798737R132