From 29d2f482145314ee8bbc5cf413b1c38654736a95 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 21 Feb 2022 22:48:22 +0000 Subject: [PATCH] Deep copy the original style when highlighting an object Fixes #3465 --- app/assets/javascripts/index/browse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/index/browse.js b/app/assets/javascripts/index/browse.js index b6a388d81..779a21d69 100644 --- a/app/assets/javascripts/index/browse.js +++ b/app/assets/javascripts/index/browse.js @@ -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); -- 2.39.5