From 3dfa3fd15779ecaef93ba217771f644099e1db26 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Tue, 17 Apr 2012 08:11:48 +0200 Subject: [PATCH] Changed ZoomOut control to inherit from OpenLayers.Control.Button. --- lib/OpenLayers/Control/ZoomOut.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/OpenLayers/Control/ZoomOut.js b/lib/OpenLayers/Control/ZoomOut.js index 2a538af9a3..6d6d818e2b 100644 --- a/lib/OpenLayers/Control/ZoomOut.js +++ b/lib/OpenLayers/Control/ZoomOut.js @@ -4,7 +4,7 @@ * full text of the license. */ /** - * @requires OpenLayers/Control.js + * @requires OpenLayers/Control/Button.js */ /** @@ -14,21 +14,15 @@ * Inherits from: * - */ -OpenLayers.Control.ZoomOut = OpenLayers.Class(OpenLayers.Control, { +OpenLayers.Control.ZoomOut = 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 */ trigger: function(){ - this.map.zoomOut(); + if (this.map) { + this.map.zoomOut(); + } }, CLASS_NAME: "OpenLayers.Control.ZoomOut"