From c24a3cf5450f85a42c7cba2dd43630724a068e2b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 25 Sep 2018 20:58:10 +0200 Subject: Fix detail display after hover --- chimere/static/chimere/js/jquery.chimere.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index 62899ec..028f5c2 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -599,18 +599,17 @@ function transformCoordToLonLat(coord) { {top: y + 'px', left: x + 'px'} ); $("#" + map_id + "_hover").show(); - } else { - if (settings[map_id].mouse_hover_opened != pk){ - settings[map_id].mouse_hover_opened = pk; - if ($('.popover-content').is(':visible')){ - $(settings[map_id].popup_item).popover('destroy'); - } - if (feature.get('name')){ - methods.openPopup( - map_id, feature, null, null, - feature.getGeometry().getCoordinates(), - true); - } + } + if (settings[map_id].mouse_hover_opened != pk){ + settings[map_id].mouse_hover_opened = pk; + if ($('.popover-content').is(':visible')){ + $(settings[map_id].popup_item).popover('destroy'); + } + if (feature.get('name')){ + methods.openPopup( + map_id, feature, null, null, + feature.getGeometry().getCoordinates(), + true); } } @@ -1367,7 +1366,9 @@ function transformCoordToLonLat(coord) { }, openPopup: function(map_id, feature, offset_x, offset_y, alt_coordinates, no_detail){ - settings[map_id].current_feature = feature; + if (!no_detail){ + settings[map_id].current_feature = feature; + } if (!offset_x){ offset_x = feature.get('popup_offset_x'); if (!offset_x) offset_x = 0; -- cgit v1.2.3