Skip to content

Commit

Permalink
ui/web: disable path module calls (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohoch authored Sep 10, 2024
1 parent 5d6fbd0 commit 23e50d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions ui/web/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,16 @@ function initPorts(app, apiEndpoint, tilesEndpoint, initialPermalink, style) {
syncMaps(map_bg, map_fg);

map_fg.on("load", () => {
RailViz.Path.Base.init(map_fg, apiEndpoint);
//RailViz.Path.Base.init(map_fg, apiEndpoint);
RailViz.GBFS.init(map_fg, apiEndpoint);

map_fg.addLayer(new RailVizCustomLayer());

RailViz.Path.Extra.init(map_fg, "railviz-base-stations");
RailViz.Path.Detail.init(map_fg, "railviz-base-stations");
RailViz.Path.Connections.init(map_fg, "railviz-base-stations");
//const before = "railviz-base-stations";
const before = null;
RailViz.Path.Extra.init(map_fg, before);
RailViz.Path.Detail.init(map_fg, before);
RailViz.Path.Connections.init(map_fg, before);
});

["click", "mousemove", "mouseout"].forEach((t) =>
Expand Down
6 changes: 3 additions & 3 deletions ui/web/js/railviz/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ RailViz.Main = (function () {

function showFullData() {
showingDetailData = false;
RailViz.Path.Base.setEnabled(trainsEnabled);
//RailViz.Path.Base.setEnabled(trainsEnabled);
RailViz.Path.Extra.setData(fullData);
RailViz.Path.Extra.setEnabled(trainsEnabled);
RailViz.Path.Detail.setEnabled(false);
Expand All @@ -199,7 +199,7 @@ RailViz.Main = (function () {

function showDetailData() {
showingDetailData = true;
RailViz.Path.Base.setEnabled(false);
//RailViz.Path.Base.setEnabled(false);
RailViz.Path.Extra.setEnabled(false);
RailViz.Path.Detail.setData(detailFilter, detailTrips);
RailViz.Path.Detail.setEnabled(true);
Expand All @@ -214,7 +214,7 @@ RailViz.Main = (function () {

function showTrains(b) {
trainsEnabled = b;
RailViz.Path.Base.setEnabled(!showingDetailData && trainsEnabled);
//RailViz.Path.Base.setEnabled(!showingDetailData && trainsEnabled);
RailViz.Path.Extra.setEnabled(!showingDetailData && trainsEnabled);
RailViz.Path.Detail.setEnabled(showingDetailData && trainsEnabled);
RailViz.Render.setTrainsEnabled(trainsEnabled);
Expand Down

0 comments on commit 23e50d2

Please sign in to comment.