Skip to content

Commit

Permalink
fix: remove excluded portals when dialog is open
Browse files Browse the repository at this point in the history
  • Loading branch information
le-jeu committed Apr 13, 2024
1 parent f85eccf commit 6234728
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/code/dialogs/autodraws/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ export const AutoDraw = WDialog.extend({
zone.contains(p.latLng)
);
}
// Remove newly excluded portals
const excludes = new Set(
this._operation.markers
.filter(
(m) => m.type === WasabeeMarker.constants.MARKER_TYPE_EXCLUDE
)
.map((m) => m.portalId)
);
portalSet.portals = portalSet.portals.filter(
(p) => !excludes.has(p.id)
);
}
}
portalSet.display.textContent = wX("PORTAL_COUNT", {
Expand Down

0 comments on commit 6234728

Please sign in to comment.