Leaflet/Leaflet — pull request #1374 by oslek (2013-02-14 01:46:23+00:00)
Title: Move events

I created this fiddle http://jsfiddle.net/cxZRM/ to view the behavior of move-related events. To use the fiddle, open your browser console and watch event behavior with various map moves. Resize the result pane to see moveend events. Click the actions below the map. Drag the map with and without inertia. “Log Line” can be used to add a console line/tag for clarity.

Leaflet v0.5 results in following output:

```
LOG: _______________________________ zoom
LOG: < movestart
LOG: ( zoomstart
LOG: ) zoomend
LOG: > moveend
LOG: _______________________________ drag
LOG: < movestart
LOG: [ dragstart
LOG: > moveend
LOG: ] dragend
LOG: _______________________________ drag with inertia
LOG: < movestart
LOG: [ dragstart
LOG: ] dragend
LOG: < movestart
LOG: > moveend
LOG: _______________________________ vertical resize
LOG: > moveend
```

There are three commits in this branch to address three separate behaviors: false move events on resize, event order on drag, and extra movestart on drag with inertia. The output becomes:

```
LOG: _______________________________ zoom
LOG: < movestart
LOG: ( zoomstart
LOG: ) zoomend
LOG: > moveend
LOG: _______________________________ drag
LOG: < movestart
LOG: [ dragstart
LOG: ] dragend
LOG: > moveend
LOG: _______________________________ drag with inertia
LOG: < movestart
LOG: [ dragstart
LOG: ] dragend
LOG: > moveend
LOG: _______________________________ vertical resize
```

(no change to zoom, just shown for comparison)