New syntax for overlay autoPan.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 2 Jan 2021 16:29:13 +0000 (17:29 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 2 Jan 2021 16:29:13 +0000 (17:29 +0100)
wrmap.js

index 2bd5ad7610f8beb88428bacfca61c1aa9ff1d5f3..40c5773a18b9167fc923fdfaa4948ee0140db1f0 100644 (file)
--- a/wrmap.js
+++ b/wrmap.js
@@ -165,7 +165,7 @@ function init_wrmap(i, jq_map) {
        var popup_container = document.getElementById('popup');
        var popup_content = document.getElementById('popup-content');
        var popup_closer = document.getElementById('popup-closer');
        var popup_container = document.getElementById('popup');
        var popup_content = document.getElementById('popup-content');
        var popup_closer = document.getElementById('popup-closer');
-       var popup_overlay = new ol.Overlay({element: popup_container, autoPan: true, autoPanAnimation: {duration: 250}});
+       var popup_overlay = new ol.Overlay({element: popup_container, autoPan: {animation: {duration: 250}}});
        popup_closer.onclick = function() {popup_overlay.setPosition(undefined); popup_closer.blur(); return false;};
 
        function create_popup_dom(feature) {
        popup_closer.onclick = function() {popup_overlay.setPosition(undefined); popup_closer.blur(); return false;};
 
        function create_popup_dom(feature) {