Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

Commit

Permalink
Issue #158 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwouaiebe committed Mar 17, 2021
1 parent 6ce0af8 commit 74a932e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/NoteEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ class NoteEditor {
let newNoteLatLng = [ data.osmElement.lat, data.osmElement.lon ];
let routeObjId = INVALID_OBJ_ID;
let distance = Number.MAX_VALUE;
let distanceOnRoute = ZERO;

function selectRoute ( route ) {
if ( route.objId !== theTravelNotesData.editedRouteObjId ) {
Expand All @@ -439,6 +440,7 @@ class NoteEditor {
routeObjId = route.objId;
distance = distanceToRoute;
newNoteLatLng = pointAndDistance.latLng;
distanceOnRoute = pointAndDistance.distance;
}
}
}
Expand All @@ -456,6 +458,7 @@ class NoteEditor {
note.iconLatLng = noteLatLng;
note.iconHeight = ICON_DIMENSIONS.height;
note.iconWidth = ICON_DIMENSIONS.width;
note.distance = distanceOnRoute;

if ( data.osmElement.tags.rcn_ref ) {
note.iconContent =
Expand Down

0 comments on commit 74a932e

Please sign in to comment.