]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/browse.js
Deep copy the original style when highlighting an object
[rails.git] / 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);