source:
trunk/workshop-routing-foss4g/web/OpenLayers/lib/OpenLayers/Control/Button.js
@
76
Revision 76, 1.2 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Rev | Line | |
---|---|---|
[76] | 1 | /* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for |
2 | * full list of contributors). Published under the Clear BSD license. | |
3 | * See http://svn.openlayers.org/trunk/openlayers/license.txt for the | |
4 | * full text of the license. */ | |
5 | ||
6 | /** | |
7 | * @requires OpenLayers/Control.js | |
8 | */ | |
9 | ||
10 | /** | |
11 | * Class: OpenLayers.Control.Button | |
12 | * The Button control is a very simple push-button, for use with | |
13 | * <OpenLayers.Control.Panel>. | |
14 | * When clicked, the function trigger() is executed. | |
15 | * | |
16 | * Inherits from: | |
17 | * - <OpenLayers.Control> | |
18 | * | |
19 | * Use: | |
20 | * (code) | |
21 | * var button = new OpenLayers.Control.Button({ | |
22 | * displayClass: "MyButton", trigger: myFunction | |
23 | * }); | |
24 | * panel.addControls([button]); | |
25 | * (end) | |
26 | * | |
27 | * Will create a button with CSS class MyButtonItemInactive, that | |
28 | * will call the function MyFunction() when clicked. | |
29 | */ | |
30 | OpenLayers.Control.Button = OpenLayers.Class(OpenLayers.Control, { | |
31 | /** | |
32 | * Property: type | |
33 | * {Integer} OpenLayers.Control.TYPE_BUTTON. | |
34 | */ | |
35 | type: OpenLayers.Control.TYPE_BUTTON, | |
36 | ||
37 | /** | |
38 | * Method: trigger | |
39 | * Called by a control panel when the button is clicked. | |
40 | */ | |
41 | trigger: function() {}, | |
42 | ||
43 | CLASS_NAME: "OpenLayers.Control.Button" | |
44 | }); |
Note: See TracBrowser
for help on using the repository browser.