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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user