I'm finding that sometimes when I click a feature in my maps, and a popup appears with "autopan" configured, the auto-panning incorrectly shifts the map so that the feature and the popup are outside of the map borders. You then have to click and drag the map back over to see the popup.

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

Status: Active » Needs review

I figured out the cause of this. We were setting the position of the popup BEFORE adding content to it, so the size of the popup was not being calculated correctly. Instead, we should be adding content to the popop and THEN set its position.

Here is a pull request: https://github.com/drupol/openlayers/pull/28

m.stenta’s picture

In addition to the pull request, here is a patch that applies cleanly against the 7.x-3.0-beta5 release. This patch should only be used if you have that exact version of the module installed on a site and you need to fix this bug. It will not apply against the current dev branch because the lines of code that it modifies have changed slightly in 7.x-3.x-dev.

The only reason I am posting this here is so that I can include it in my makefile.

  • m.stenta committed ac9c728 on 7.x-3.x
    Issue #2629008: Popups sometimes auto-pan off screen
    
  • Pol committed b0dd2ef on 7.x-3.x
    Merge pull request #28 from farmOS/2629008
    
    Issue #2629008: Popups...
m.stenta’s picture

Status: Needs review » Fixed

Thanks Pol!

  • Pol committed 196f30f on 7.x-3.x
    Follow up of issue #2629008: Popups sometimes auto-pan off screen
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.