From 029bdaccde18d06b0d3a3c43fe589b2d03aa5963 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Fri, 13 Apr 2012 09:59:44 +0200 Subject: [PATCH] The ZoomToMaxExtent control should extend the OpenLayers.Control.Button and not OpenLayers.Control. --- lib/OpenLayers/Control/ZoomToMaxExtent.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/OpenLayers/Control/ZoomToMaxExtent.js b/lib/OpenLayers/Control/ZoomToMaxExtent.js index b172c28dc7..b8ac7a9b70 100644 --- a/lib/OpenLayers/Control/ZoomToMaxExtent.js +++ b/lib/OpenLayers/Control/ZoomToMaxExtent.js @@ -4,7 +4,7 @@ * full text of the license. */ /** - * @requires OpenLayers/Control.js + * @requires OpenLayers/Control/Button.js */ /** @@ -16,19 +16,14 @@ * Inherits from: * - */ -OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control, { +OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control.Button, { /** - * Property: type - * {String} The type of -- When added to a - * , 'type' is used by the panel to determine how to - * handle our events. - */ - type: OpenLayers.Control.TYPE_BUTTON, - - /* * Method: trigger - * Do the zoom. + * + * Called whenever this control is being rendered inside of a panel and a + * click occurs on this controls element. Actually zooms to the maximum + * extent of this controls map. */ trigger: function() { if (this.map) {