~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to gis/dhis-gis-geostat/mfbase/openlayers/lib/OpenLayers/Control/NavToolbar.js

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
 
2
 * license.  See http://svn.openlayers.org/trunk/openlayers/license.txt for the
 
3
 * full text of the license. */
 
4
 
 
5
/**
 
6
 * @requires OpenLayers/Control/Panel.js
 
7
 * @requires OpenLayers/Control/Navigation.js
 
8
 * @requires OpenLayers/Control/ZoomBox.js
 
9
 */
 
10
 
 
11
/**
 
12
 * Class: OpenLayers.Control.NavToolbar
 
13
 * 
 
14
 * Inherits from:
 
15
 *  - <OpenLayers.Control.Panel>
 
16
 */
 
17
OpenLayers.Control.NavToolbar = OpenLayers.Class(OpenLayers.Control.Panel, {
 
18
 
 
19
    /**
 
20
     * Constructor: OpenLayers.Control.NavToolbar 
 
21
     * Add our two mousedefaults controls.
 
22
     *
 
23
     * Parameters:
 
24
     * options - {Object} An optional object whose properties will be used
 
25
     *     to extend the control.
 
26
     */
 
27
    initialize: function(options) {
 
28
        OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
 
29
        this.addControls([
 
30
          new OpenLayers.Control.Navigation(),
 
31
          new OpenLayers.Control.ZoomBox()
 
32
        ]);
 
33
    },
 
34
 
 
35
    /**
 
36
     * Method: draw 
 
37
     * calls the default draw, and then activates mouse defaults.
 
38
     */
 
39
    draw: function() {
 
40
        var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
 
41
        this.activateControl(this.controls[0]);
 
42
        return div;
 
43
    },
 
44
 
 
45
    CLASS_NAME: "OpenLayers.Control.NavToolbar"
 
46
});