updated HTML5 UI to reflect changed parameter (min_distance -> preferred_distance)
restored changes from 54c6fc21162fcfc8ce7470f443c58b3ccf936cc4 by cherry pick