Rename sort to sortWaypoints

This commit is contained in:
isaisstillalive 2020-07-07 08:35:39 +09:00
parent b1fce1b115
commit 1e1aa80568
1 changed files with 3 additions and 3 deletions

View File

@ -272,7 +272,7 @@ export class HUDWaypoints extends BaseHUDPart {
zoomLevel: Math.max(this.root.camera.zoomLevel, globalConfig.mapChunkOverviewMinZoom + 0.05), zoomLevel: Math.max(this.root.camera.zoomLevel, globalConfig.mapChunkOverviewMinZoom + 0.05),
}); });
this.sort(); this.sortWaypoints();
// Show notification about creation // Show notification about creation
this.root.hud.signals.notification.dispatch( this.root.hud.signals.notification.dispatch(
@ -325,7 +325,7 @@ export class HUDWaypoints extends BaseHUDPart {
renameWaypoint(waypoint, label) { renameWaypoint(waypoint, label) {
waypoint.label = label; waypoint.label = label;
this.sort(); this.sortWaypoints();
// Show notification about renamed // Show notification about renamed
this.root.hud.signals.notification.dispatch( this.root.hud.signals.notification.dispatch(
@ -349,7 +349,7 @@ export class HUDWaypoints extends BaseHUDPart {
/** /**
* Sort waypoints by name * Sort waypoints by name
*/ */
sort() { sortWaypoints() {
this.waypoints.sort((a, b) => { this.waypoints.sort((a, b) => {
if (!a.label) { if (!a.label) {
return -1; return -1;