1 /* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license.
2 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt
3 * for the full text of the license. */
6 * @requires OpenLayers/Control.js
10 * Class: OpenLayers.Control.Button
11 * The Button control is a very simple push-button, for use with
12 * <OpenLayers.Control.Panel>.
13 * When clicked, the function trigger() is executed.
16 * - <OpenLayers.Control>
20 * var button = new OpenLayers.Control.Button({
21 * displayClass: "MyButton", trigger: myFunction
23 * panel.addControls([button]);
26 * Will create a button with CSS class MyButtonItemInactive, that
27 * will call the function MyFunction() when clicked.
29 OpenLayers.Control.Button = OpenLayers.Class(OpenLayers.Control, {
32 * {Integer} OpenLayers.Control.TYPE_BUTTON.
34 type: OpenLayers.Control.TYPE_BUTTON,
38 * Called by a control panel when the button is clicked.
40 trigger: function() {},
42 CLASS_NAME: "OpenLayers.Control.Button"