OpenLayers OpenLayers

Changeset 4250

Show
Ignore:
Timestamp:
09/12/07 16:14:14 (1 year ago)
Author:
crschmidt
Message:

Patch from Erik/I to fix:
Popups don't move adequately after zooming with scroll wheel
(Closes #494)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Popup/Anchored.js

    r4247 r4250  
    9292    /** 
    9393     * Method: moveTo 
     94     * Since the popup is moving to a new px, it might need also to be moved 
     95     *     relative to where the marker is. 
    9496     *  
    9597     * Parameters: 
     
    9799     */ 
    98100    moveTo: function(px) { 
     101        this.relativePosition = this.calculateRelativePosition(px); 
     102         
    99103        var newPx = this.calculateNewPx(px); 
    100104         
  • trunk/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js

    r4248 r4250  
    5353        this.setContentHTML(); 
    5454         
    55         this.setRicoCorners(!this.rounded); 
    56         this.rounded = true; 
    57          
    5855        //set the popup color and opacity            
    5956        this.setBackgroundColor();  
     
    6158 
    6259        return this.div; 
     60    }, 
     61 
     62    /** 
     63     * Method: moveTo 
     64     * The popup may have been moved to a new relative location, in which case 
     65     *     we will want to re-do the rico corners. 
     66     *  
     67     * Parameters: 
     68     * px - {<OpenLayers.Pixel>} 
     69     */ 
     70    moveTo: function(px) { 
     71        OpenLayers.Popup.Anchored.prototype.moveTo.apply(this, arguments); 
     72        this.setRicoCorners(!this.rounded); 
     73        this.rounded = true; 
    6374    }, 
    6475 
  • trunk/openlayers/tests/list-tests.html

    r4231 r4250  
    3232    <li>Marker/test_Box.html</li> 
    3333    <li>test_Popup.html</li> 
     34    <li>Popup/test_Anchored.html</li> 
    3435    <li>test_Feature.html</li> 
    3536    <li>Feature/test_Vector.html</li>