ca0v / ol3-popup

OpenLayers 3 popup overlay

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restore ability to explicitly pan into view

ca0v opened this issue · comments

2.0.5 removes panIntoView since it's already available in ol.Overlay as a private method. The only way to get it to execute is to change the "position" (see https://github.com/openlayers/openlayers/blob/master/src/ol/overlay.js#L118) of the overlay.

But if paging causes the infoviewer to grow it would be nice to be able to pan the infoviewer fully into view.

It's not as easy as setting to position to the current position because the even only fires when the position actually changes. I think creating a new coordinate object should do the trick.