~flavour/sahana-eden/trunk

« back to all changes in this revision

Viewing changes to static/scripts/gis/openlayers/lib/OpenLayers/Control/ZoomBox.js

  • Committer: Fran Boon
  • Date: 2012-01-21 16:10:49 UTC
  • Revision ID: fran@aidiq.com-20120121161049-u2ytuiymn1t312c6
JS upgrade: jQuery, jQueryUI, OpenLayers, Ext, GeoExt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
 
1
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for 
2
2
 * full list of contributors). Published under the Clear BSD license.  
3
3
 * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
4
4
 * full text of the license. */
31
31
    out: false,
32
32
 
33
33
    /**
34
 
     * Property: alwaysZoom
 
34
     * APIProperty: keyMask
 
35
     * {Integer} Zoom only occurs if the keyMask matches the combination of 
 
36
     *     keys down. Use bitwise operators and one or more of the
 
37
     *     <OpenLayers.Handler> constants to construct a keyMask. Leave null if 
 
38
     *     not used mask. Default is null.
 
39
     */
 
40
    keyMask: null,
 
41
 
 
42
    /**
 
43
     * APIProperty: alwaysZoom
35
44
     * {Boolean} Always zoom in/out, when box drawed 
36
45
     */
37
46
    alwaysZoom: false,
54
63
        if (position instanceof OpenLayers.Bounds) {
55
64
            var bounds;
56
65
            if (!this.out) {
57
 
                var minXY = this.map.getLonLatFromPixel(
58
 
                            new OpenLayers.Pixel(position.left, position.bottom));
59
 
                var maxXY = this.map.getLonLatFromPixel(
60
 
                            new OpenLayers.Pixel(position.right, position.top));
 
66
                var minXY = this.map.getLonLatFromPixel({
 
67
                    x: position.left,
 
68
                    y: position.bottom
 
69
                });
 
70
                var maxXY = this.map.getLonLatFromPixel({
 
71
                    x: position.right,
 
72
                    y: position.top
 
73
                });
61
74
                bounds = new OpenLayers.Bounds(minXY.lon, minXY.lat,
62
75
                                               maxXY.lon, maxXY.lat);
63
76
            } else {