Skip to content

Commit

Permalink
Gp Network fix (#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
xbpcb authored Nov 15, 2024
1 parent f455078 commit aac2e50
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/views/pages/globalping/network.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@

this.set('probesByContinents', groupedByContinents);
this.set('probesByCoords', groupedByCoords);

// set initial probes and marker data values
let filtersSet = this.get('filtersSet');

this.set('filteredProbes', this.getFilteredProbesList(filtersSet));
this.set('filteredMarkersData', this.getFilteredMarkersData(filtersSet));
}
});

Expand All @@ -260,6 +266,8 @@

// prepare probes data for rendering
this.observe('filteredProbes', (filteredProbes) => {
if (!filteredProbes) { return; }

let screenWidth = this.get('screenWidth');
let columnsAmount = this.getLayoutColumnsAmount(screenWidth);

Expand Down Expand Up @@ -312,7 +320,7 @@
}

map.addListener('zoom_changed', () => {
markerCluster.clusters.forEach((c) => {
markerCluster?.clusters.forEach((c) => {
let m = c.marker;
let { svgWidth, svgHeight } = getMarkerSize(Number(m.content.getAttribute('data-probe-count')), map.zoom);
m.content.style.width = `${svgWidth}px`;
Expand Down Expand Up @@ -392,7 +400,8 @@
});
}

let byContinentFilerRule = this.get('filtersSet').find(fR => fR.type === FILTER_TYPE_BY_CONTINENT);
let filtersSet = this.get('filtersSet');
let byContinentFilerRule = filtersSet ? filtersSet.find(fR => fR.type === FILTER_TYPE_BY_CONTINENT) : null;

if (byContinentFilerRule) {
this.focusMapOnMarkers(markersData);
Expand Down

0 comments on commit aac2e50

Please sign in to comment.