openlayers/ol3 — pull request #2829 by tschaub (2014-10-13 16:55:46+00:00)
Title: Zoom slider refactor

This updates the behavior of the zoom slider in a few ways. The initial goal was just to animate the transition to new zoom levels (see #2823), but there were a number of other related changes I thought were worth making.

The changes below can be seen when comparing the zoom slider example [in master](http://openlayers.org/en/master/examples/zoomslider.html) with the one [in this branch](http://tschaub.net/ol3-slider/examples/zoomslider.html).

* When you click on the slider container, the view animates from the current resolution to the constrained target resolution. In master, it jumps to the target resolution and then animates to the constrained target resolution.
* The slider thumb is allowed to range over the full height/width of the slider container. In master, the slider thumb ranges over the container height/width minus any padding. This causes problems when the container has a lot of padding (you can currently see that the thumb cannot be dragged all the way to the bottom of the container [in master](http://openlayers.org/en/master/examples/zoomslider.html) - it is easier to see if you bump up the padding on the container). With this change, if you want the slider thumb to have some "buffer" within the container, you give it a margin. The thumbs in the first two maps [in the example](http://tschaub.net/ol3-slider/examples/zoomslider.html) have margin, and the thumb in the third map has no margin.
* When you click on the track, the thumb is positioned so that its center is as close to the click as possible. [In master](http://openlayers.org/en/master/examples/zoomslider.html) the thumb is positioned below the click. [In this branch](http://tschaub.net/ol3-slider/examples/zoomslider.html) the thumb is positioned under the click - taking into account the constrained resolution.
* While dragging the thumb, the view is given the "interacting" hint. Though not visible in the example, the performance in master is bad with large maps and vector layers. Providing the interacting hint improves performance for vector rendering.
* The slider container is given the `ol-control` CSS class name so it can share styles with other controls.
* Various other renaming and coding style changes for clarity and consistency.

Fixes #2823.