diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-09-25 20:58:10 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-09-25 21:02:12 +0200 |
commit | c24a3cf5450f85a42c7cba2dd43630724a068e2b (patch) | |
tree | 824e92a1017544f23404e858ce73eb4480ba4170 | |
parent | 557099fbd286f151431fb8d8afdecbd3740650ae (diff) | |
download | Chimère-c24a3cf5450f85a42c7cba2dd43630724a068e2b.tar.bz2 Chimère-c24a3cf5450f85a42c7cba2dd43630724a068e2b.zip |
Fix detail display after hover
-rw-r--r-- | chimere/static/chimere/js/jquery.chimere.js | 27 |
1 files 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; |