Rename style_function_selected to style_function_highlight.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 2 Jan 2021 17:48:25 +0000 (18:48 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 2 Jan 2021 17:48:25 +0000 (18:48 +0100)
wrmap.js

index ac16eeb7ec417d870bdb84bb837b4c602a4bd496..c957094bb333a29ce39f1b521f9b574773951e83 100644 (file)
--- 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) {