From: Tom Hughes Date: Mon, 21 Feb 2022 22:48:22 +0000 (+0000) Subject: Deep copy the original style when highlighting an object X-Git-Tag: live~1808 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/29d2f482145314ee8bbc5cf413b1c38654736a95 Deep copy the original style when highlighting an object Fixes #3465 --- 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);