Changed ZoomIn control to inherit from OpenLayers.Control.Button.

This commit is contained in:
Marc Jansen
2012-04-17 20:05:47 +02:00
parent 4af41b41f5
commit 292da06150

View File

@@ -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>
*/
OpenLayers.Control.ZoomIn = OpenLayers.Class(OpenLayers.Control, {
OpenLayers.Control.ZoomIn = OpenLayers.Class(OpenLayers.Control.Button, {
/**
* Property: type
* {String} The type of <OpenLayers.Control> -- When added to a
* <Control.Panel>, '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"