OpenLayers OpenLayers

Changeset 2166

Show
Ignore:
Timestamp:
01/20/07 11:49:52 (2 years ago)
Author:
tschaub
Message:

prevent overview map extent rectangle from getting dropped (FF only) - see #468

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js

    r2165 r2166  
    134134        }); 
    135135        this.rectEvents = new OpenLayers.Events(this, this.extentRectangle); 
    136         this.rectEvents.register('mouseover', this, this.rectMouseOver); 
    137136        this.rectEvents.register('mouseout', this, this.rectMouseOut); 
    138137        this.rectEvents.register('mousedown', this, this.rectMouseDown); 
     
    201200    * @param {OpenLayers.Event} evt 
    202201    */ 
    203     rectMouseOver: function (evt) { 
    204         this.extentRectangle.style.cursor = 'move'; 
    205     }, 
    206  
    207     /** 
    208     * @param {OpenLayers.Event} evt 
    209     */ 
    210202    rectMouseOut: function (evt) { 
    211         this.extentRectangle.style.cursor = 'default'; 
    212203        if(this.rectDragStart != null) { 
    213204            if(this.performedRectDrag) { 
    214                 this.updateMapToRect(); 
    215             }         
     205                this.rectMouseMove(evt); 
     206                var rectPxBounds = this.getRectPxBounds();  
     207                // if we're off of the overview map, update the main map 
     208                // otherwise, keep moving the rect 
     209                if((rectPxBounds.top <= 0) || (rectPxBounds.left <= 0) ||  
     210                   (rectPxBounds.bottom >= this.size.h - this.hComp) ||  
     211                   (rectPxBounds.right >= this.size.w - this.wComp)) { 
     212                    this.updateMapToRect(); 
     213                } else { 
     214                    return;  
     215                } 
     216            } 
    216217            document.onselectstart = null; 
    217218            this.rectDragStart = null; 
  • trunk/openlayers/theme/default/style.css

    r1695 r2166  
    5757 
    5858.olControlOverviewMapExtentRectangle { 
     59   cursor: move; 
    5960    border: 2px dotted red; 
    6061}