diff options
Diffstat (limited to 'ishtar_common/static/js/ishtar-map.js')
| -rw-r--r-- | ishtar_common/static/js/ishtar-map.js | 14 | 
1 files changed, 9 insertions, 5 deletions
| diff --git a/ishtar_common/static/js/ishtar-map.js b/ishtar_common/static/js/ishtar-map.js index 78c02adca..2a64d321e 100644 --- a/ishtar_common/static/js/ishtar-map.js +++ b/ishtar_common/static/js/ishtar-map.js @@ -102,16 +102,16 @@ var enable_clustering = function(){      _styleCache = {}; -    // Cluster Source +    // cluster Source      cluster_source = new ol.source.Cluster({          distance: 40,          source: new ol.source.Vector()      }); -    // Animated cluster layer +    // animated cluster layer      cluster_layer = new ol.layer.Vector({          name: 'Cluster',          source: cluster_source, -        // Cluster style +        // cluster style          style: cluster_get_style      });      map.addLayer(cluster_layer); @@ -204,7 +204,7 @@ var click_on_cluster = function(feature, zoom_level, duration, nb_zoom,      if (!zoom_level) zoom_level = v.getZoom() + 1;      // center -    var new_center = feature.getGeometry().getCoordinates() +    var new_center = feature.getGeometry().getCoordinates();      // max zoom reached      if (zoom_level >= min_auto_zoom_on_cluster){          animate_in_progress = true; @@ -299,8 +299,12 @@ var _display_items = function(features, offset_x, offset_y){      $(popup_item).html(popup_content);      $(".map-list-detail").click(open_map_window);      popup.setPosition(geom.getCoordinates()); +    popup.setOffset([offset_x, offset_y]);      $(popup_item).show(function(){ -        popup.setOffset([offset_x, offset_y]); + +        setTimeout(function(){ +            popup.setOffset([offset_x, offset_y]); +        }, 200);      });  }; | 
