From 2630a661b3eeb0af2497ca14faa8e80feb14b4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sat, 14 Dec 2024 12:51:50 +0000 Subject: [PATCH] fix unhighlight in editor --- src/c3nav/editor/static/editor/js/editor.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 94732b72..a76f4643 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -1238,7 +1238,6 @@ editor = { // highlight a geometries layer and itemtable row if they both exist var geometries = editor._highlight_geometries[id]; if (!geometries) return; - var option; for (geometry of geometries) { geometry.setStyle({ color: '#FFFFDD', @@ -1257,7 +1256,7 @@ editor = { for (geometry of geometries) { var hasOption, optionSelected; if (editor.accessRestrictionSelect) { - var option = editor.accessRestrictionSelect.find('[value=' + String(feature.properties.access_restriction) + ']'); + option = editor.accessRestrictionSelect.find('[value=' + String(geometry.highlightID) + ']'); hasOption = !!option.length; optionSelected = option.is(':selected'); } else {