From fa25b9d658ac2335a032cca2a8f5e21e824e3a16 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Sun, 22 Jun 2025 13:44:29 +0300 Subject: [PATCH] Rename Browse javascript controllers to Element --- app/assets/javascripts/index.js | 12 ++++++------ app/assets/javascripts/index/element.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 733bfab7e..4544ae88c 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -300,12 +300,12 @@ $(function () { "/history": history, "/user/:display_name/history": history, "/note/:id": OSM.Note(map), - "/node/:id(/history)": OSM.Browse(map, "node"), - "/node/:id/history/:version": OSM.Browse(map, "node"), - "/way/:id(/history)": OSM.Browse(map, "way"), - "/way/:id/history/:version": OSM.OldBrowse(), - "/relation/:id(/history)": OSM.Browse(map, "relation"), - "/relation/:id/history/:version": OSM.OldBrowse(), + "/node/:id(/history)": OSM.MappedElement(map, "node"), + "/node/:id/history/:version": OSM.MappedElement(map, "node"), + "/way/:id(/history)": OSM.MappedElement(map, "way"), + "/way/:id/history/:version": OSM.Element(map, "way"), + "/relation/:id(/history)": OSM.MappedElement(map, "relation"), + "/relation/:id/history/:version": OSM.Element(map, "relation"), "/changeset/:id": OSM.Changeset(map), "/query": OSM.Query(map), "/account/home": OSM.Home(map) diff --git a/app/assets/javascripts/index/element.js b/app/assets/javascripts/index/element.js index b0b2b6faa..4f2ec8ff4 100644 --- a/app/assets/javascripts/index/element.js +++ b/app/assets/javascripts/index/element.js @@ -1,5 +1,5 @@ (function () { - OSM.OldBrowse = function () { + OSM.Element = function () { const page = {}; page.pushstate = page.popstate = function (path) { @@ -9,7 +9,7 @@ return page; }; - OSM.Browse = function (map, type) { + OSM.MappedElement = function (map, type) { const page = {}; page.pushstate = page.popstate = function (path, id, version) { -- 2.39.5