Changed ZoomOut control to inherit from OpenLayers.Control.Button.
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
* full text of the license. */
|
* full text of the license. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires OpenLayers/Control.js
|
* @requires OpenLayers/Control/Button.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,21 +14,15 @@
|
|||||||
* Inherits from:
|
* Inherits from:
|
||||||
* - <OpenLayers.Control>
|
* - <OpenLayers.Control>
|
||||||
*/
|
*/
|
||||||
OpenLayers.Control.ZoomOut = OpenLayers.Class(OpenLayers.Control, {
|
OpenLayers.Control.ZoomOut = 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
|
* Method: trigger
|
||||||
*/
|
*/
|
||||||
trigger: function(){
|
trigger: function(){
|
||||||
this.map.zoomOut();
|
if (this.map) {
|
||||||
|
this.map.zoomOut();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
CLASS_NAME: "OpenLayers.Control.ZoomOut"
|
CLASS_NAME: "OpenLayers.Control.ZoomOut"
|
||||||
|
|||||||
Reference in New Issue
Block a user