openlayers/openlayers — pull request #882 by tschaub (2013-02-14 22:05:09+00:00)
Title: Restored zoom box behavior

With the nice animated zoom change (#800), the ZoomBox was changed to use `zoomTo` instead of `zoomToExtent`. The [calculation of the pixel origin](https://github.com/ahocevar/openlayers/commit/21448d2fd57d3d618a9cff4d1ded6a0e947eec5a#L2R105) (or anchor) for `zoomTo` was a bit off. Fortunately, the tests caught this! The change in behavior can also be seen in examples using the zoom box - after zooming, the map is not centered on the center of the drawn rectangle.

With the changes here, all tests pass again. And the examples work as expected (confirmed with @bartvde's rare `out: true` setting as well :).