prevent overview map extent rectangle from getting dropped (FF only) - see #468
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2166 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -133,7 +133,6 @@ OpenLayers.Control.OverviewMap.prototype =
|
||||
OpenLayers.Event.stop(e);
|
||||
});
|
||||
this.rectEvents = new OpenLayers.Events(this, this.extentRectangle);
|
||||
this.rectEvents.register('mouseover', this, this.rectMouseOver);
|
||||
this.rectEvents.register('mouseout', this, this.rectMouseOut);
|
||||
this.rectEvents.register('mousedown', this, this.rectMouseDown);
|
||||
this.rectEvents.register('mousemove', this, this.rectMouseMove);
|
||||
@@ -197,21 +196,23 @@ OpenLayers.Control.OverviewMap.prototype =
|
||||
this.map.events.unregister("changebaselayer", this, this.baseLayerDraw);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Event} evt
|
||||
*/
|
||||
rectMouseOver: function (evt) {
|
||||
this.extentRectangle.style.cursor = 'move';
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Event} evt
|
||||
*/
|
||||
rectMouseOut: function (evt) {
|
||||
this.extentRectangle.style.cursor = 'default';
|
||||
if(this.rectDragStart != null) {
|
||||
if(this.performedRectDrag) {
|
||||
this.rectMouseMove(evt);
|
||||
var rectPxBounds = this.getRectPxBounds();
|
||||
// if we're off of the overview map, update the main map
|
||||
// otherwise, keep moving the rect
|
||||
if((rectPxBounds.top <= 0) || (rectPxBounds.left <= 0) ||
|
||||
(rectPxBounds.bottom >= this.size.h - this.hComp) ||
|
||||
(rectPxBounds.right >= this.size.w - this.wComp)) {
|
||||
this.updateMapToRect();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
document.onselectstart = null;
|
||||
this.rectDragStart = null;
|
||||
|
||||
@@ -56,6 +56,7 @@ div.olControlMousePosition {
|
||||
}
|
||||
|
||||
.olControlOverviewMapExtentRectangle {
|
||||
cursor: move;
|
||||
border: 2px dotted red;
|
||||
}
|
||||
.olLayerGeoRSSDescription {
|
||||
|
||||
Reference in New Issue
Block a user