openlayers/openlayers — pull request #414 by marcjansen (2012-04-17 20:04:24+00:00)
Title: Controls of type 'OpenLayers.Control.Button' should inherit from 'OpenLayers.Control.Button'

This pull requests suggests that the controls `Pan`, `ZoomIn`, `ZoomOut` and `ZoomToMaxExtent` should inherit from `OpenLayers.Control.Button` instead of from `OpenLayers.Control`. This let's us define and set the `type` property only once and not separately in all of the subclasses.

Also included in this request are newly added testcases for all of the above changed classes. Previously none were existing for these.

Some of the controls have also been changed to not do anything (including not to throw exceptions) when their respective trigger-method would be called prior the control being added to a map.

All relevant tests pass in Chromium 11, Firefox 11 (both on Linux-Ubuntu) and Internet Explorer 6 and 8 (both on Windows XP).

Please review.