From 22c3eb844f5bbffcfe3a0d706685d779e0f0a341 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Sat, 2 Jan 2021 18:48:25 +0100 Subject: [PATCH] Rename style_function_selected to style_function_highlight. --- wrmap.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wrmap.js b/wrmap.js index ac16eeb..c957094 100644 --- a/wrmap.js +++ b/wrmap.js @@ -127,7 +127,7 @@ function init_wrmap(i, jq_map) { } } - function style_point_function_selected(feature, resolution) { + function style_point_function_highlight(feature, resolution) { let style_array = style_point_function(feature, resolution); style_array[0].setText(new ol.style.Text({ text: get_feature_title(feature), @@ -164,8 +164,8 @@ function init_wrmap(i, jq_map) { return style_path_function(feature, resolution); }; - function style_function_selected(feature, resolution) { - if (feature.getGeometry() instanceof ol.geom.Point) return style_point_function_selected(feature, resolution); + function style_function_highlight(feature, resolution) { + if (feature.getGeometry() instanceof ol.geom.Point) return style_point_function_highlight(feature, resolution); return style_path_function(feature, resolution); }; @@ -259,12 +259,13 @@ function init_wrmap(i, jq_map) { let select_hover = new ol.interaction.Select({ condition: ol.events.condition.pointerMove, - style: style_function_selected, + style: style_function_highlight, }); map.addInteraction(select_hover); let select_click = new ol.interaction.Select({ condition: ol.events.condition.click, + style: false, }); map.addInteraction(select_click); select_click.on('select', function(event) { -- 2.39.5