@AntonKhorev commented on this pull request.


> @@ -23,6 +23,90 @@
   };
 
   OSM.MappedElement = function (map, type) {
+    let abortController = null;
+
+    function markWikidataLinkAsExplainable(i, link) {

Why is all of this wikidata code inside `OSM.MappedElement`? The idea behind 
`OSM.Element` vs `OSM.MappedElement` is that `OSM.MappedElement` has enough 
data to be displayed on the map. For wikidata you need access to tags, both 
`OSM.Element` and `OSM.MappedElement` have it.

A consequence of putting wikidata code inside `OSM.MappedElement` is that it 
won't run if you open an old version of a way or a relation, those don't fetch 
the data necessary for map rendering. But it will run for an old node.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6127#pullrequestreview-2969290389
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6127/review/2969290...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to