Gutting the OverviewMap control to give it an update. Now uses a click handler and a drag handler instead of its own event handling code. In addition, the control now has a minRecSize property. When the extent rectangle is smaller than the specified size, its style is switched. By default, we provide a rectangle replacement graphic. This can be customized with CSS. Finally, I'm tucking in one non-API property. The dragging arg sent to map.setCenter is now stored at map.dragging. This gives easy reference to dragging state where a reference to the navigation control and its drag handler is not convenient. r=pspencer (closes #1244)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5674 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2008-01-07 20:54:28 +00:00
parent 580a44a1b3
commit 9193ef67d5
7 changed files with 140 additions and 168 deletions

View File

@@ -53,6 +53,12 @@ OpenLayers.Map = OpenLayers.Class({
* {DOMElement} The element that contains the map
*/
div: null,
/**
* Property: dragging
* {Boolean} The map is currently being dragged.
*/
dragging: false,
/**
* Property: size
@@ -1221,7 +1227,8 @@ OpenLayers.Map = OpenLayers.Class({
* TBD: reconsider forceZoomChange in 3.0
*/
setCenter: function (lonlat, zoom, dragging, forceZoomChange) {
this.dragging = !!dragging;
if (!this.center && !this.isValidLonLat(lonlat)) {
lonlat = this.maxExtent.getCenterLonLat();
}