Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gp Network fix #708

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading