From 292da06150babdc1e9d6bb29b20d0b66edce8710 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Tue, 17 Apr 2012 20:05:47 +0200 Subject: [PATCH] Changed ZoomIn control to inherit from OpenLayers.Control.Button. --- lib/OpenLayers/Control/ZoomIn.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/OpenLayers/Control/ZoomIn.js b/lib/OpenLayers/Control/ZoomIn.js index 776172d2d8..afab45004f 100644 --- a/lib/OpenLayers/Control/ZoomIn.js +++ b/lib/OpenLayers/Control/ZoomIn.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.ZoomIn = OpenLayers.Class(OpenLayers.Control, { +OpenLayers.Control.ZoomIn = 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.zoomIn(); + if (this.map) { + this.map.zoomIn(); + } }, CLASS_NAME: "OpenLayers.Control.ZoomIn"