BobTorgerson/Leaflet-WMS-Time-Slider — pull request #2 by teknofire (2014-06-27 01:56:42+00:00)
Title: Refactoring slider code, getting rid of duplicate code and more...

I’ve pulled out duplicated code into their own methods (buildTimestamp, updateTimestamp, updateLayer)

Cleaned up scoping in the startSlider method to not require as many local variables
timestamp formatting is handled in the method that uses them since they know what they need best (i.e. differences between timestamps display and wms timestamp variable)

UI elements now use css classes instead of the hardcoded id attributes, this is more friendly to users that might want to have multiple sliders and for applying custom styling.

Assumes now that time steps are in seconds and converts to microseconds (who wants to type all those zero’s anyway)

Range option now only affects the slider, if you say range: false a range of dates is still provided to the wms server based on the timestep. This is a much nicer since we don’t know the exact dates for
the different time intervals in the wms.