Pull up r2181:r2229 to 2.3 branch. Includes fixes for:

#429 fix panning for odd size viewport
#478 Double clicking overview map expand/contract button zooms in Safari
#484 conflict between _addButton of MouseToolbar and PanZoom
#485 null pointer exception on CTRL+F5 in IE for WMS.Untiled
#486 add a few sanity checks to overview map
#489 requires tag incorrect in OverviewMap.js   
#498 overviewmap: rectangle has minimum height in IE



git-svn-id: http://svn.openlayers.org/branches/openlayers/2.3@2230 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2007-02-16 19:08:01 +00:00
parent 7232cfa3a0
commit b7bf7d5436
6 changed files with 100 additions and 20 deletions

View File

@@ -18,6 +18,15 @@ OpenLayers.Layer.prototype = {
/** @type DOMElement */
div: null,
/** supported application event types
*
* @type Array */
EVENT_TYPES: [
"loadstart", "loadend", "loadcancel"],
/** @type OpenLayers.Events */
events: null,
/** This variable is set when the layer is added to the map, via the
* accessor function setMap()
*
@@ -121,6 +130,8 @@ OpenLayers.Layer.prototype = {
this.div.style.height = "100%";
this.div.id = this.id;
}
this.events = new OpenLayers.Events(this, this.div, this.EVENT_TYPES);
},
/**
@@ -135,6 +146,7 @@ OpenLayers.Layer.prototype = {
this.name = null;
this.div = null;
this.options = null;
this.events = null;
},
/**
@@ -508,8 +520,8 @@ OpenLayers.Layer.prototype = {
var center = this.map.getCenter();
var res = this.map.getResolution();
var delta_x = viewPortPx.x - Math.ceil(size.w / 2);
var delta_y = viewPortPx.y - Math.ceil(size.h / 2);
var delta_x = viewPortPx.x - (size.w / 2);
var delta_y = viewPortPx.y - (size.h / 2);
lonlat = new OpenLayers.LonLat(center.lon + delta_x * res ,
center.lat - delta_y * res);