]> git.openstreetmap.org Git - rails.git/commitdiff
Deep copy the original style when highlighting an object
authorTom Hughes <tom@compton.nu>
Mon, 21 Feb 2022 22:48:22 +0000 (22:48 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 21 Feb 2022 22:48:22 +0000 (22:48 +0000)
Fixes #3465

app/assets/javascripts/index/browse.js

index b6a388d81676b6af2cb9d5695c2642359921f820..779a21d6986819423be701353b7ff9959797d2bf 100644 (file)
@@ -124,7 +124,7 @@ OSM.initializeBrowse = function (map) {
     }
 
     // Redraw in selected style
-    layer.originalStyle = layer.options;
+    layer.originalStyle = { color: layer.options.color, weight: layer.options.weight };
     layer.setStyle({ color: "#0000ff", weight: 8 });
 
     OSM.router.route("/" + layer.feature.type + "/" + layer.feature.id);