forked from MapComplete/MapComplete
chore: automatic fix some linting errors, update lint config
This commit is contained in:
parent
04c8ccb0d2
commit
804280511b
26 changed files with 47 additions and 45 deletions
|
|
@ -110,11 +110,11 @@ export class TurnRestrictionRSH extends AbstractRelationSplitHandler {
|
|||
// We have to keep only the way with a common point with the rest of the relation
|
||||
// Let's figure out which member is neighbouring our way
|
||||
|
||||
let commonStartPoint: number = await this.targetNodeAt(members.indexOf(selfMember), true)
|
||||
let commonEndPoint: number = await this.targetNodeAt(members.indexOf(selfMember), false)
|
||||
const commonStartPoint: number = await this.targetNodeAt(members.indexOf(selfMember), true)
|
||||
const commonEndPoint: number = await this.targetNodeAt(members.indexOf(selfMember), false)
|
||||
|
||||
// In normal circumstances, only one of those should be defined
|
||||
let commonPoint = commonStartPoint ?? commonEndPoint
|
||||
const commonPoint = commonStartPoint ?? commonEndPoint
|
||||
|
||||
// Let's select the way to keep
|
||||
const idToKeep: { id: number } = this._input.allWaysNodesInOrder
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export default class SplitAction extends OsmChangeAction {
|
|||
const allWaysNodesInOrder: number[][] = []
|
||||
// Lets create OsmWays based on them
|
||||
for (const wayPart of wayParts) {
|
||||
let isOriginal = wayPart === longest
|
||||
const isOriginal = wayPart === longest
|
||||
if (isOriginal) {
|
||||
// We change the existing way
|
||||
const nodeIds = wayPart.map((p) => p.originalIndex)
|
||||
|
|
@ -140,7 +140,7 @@ export default class SplitAction extends OsmChangeAction {
|
|||
allWayIdsInOrder.push(originalElement.id)
|
||||
allWaysNodesInOrder.push(nodeIds)
|
||||
} else {
|
||||
let id = changes.getNewID()
|
||||
const id = changes.getNewID()
|
||||
// Copy the tags from the original object onto the new
|
||||
const kv = []
|
||||
for (const k in originalElement.tags) {
|
||||
|
|
@ -219,7 +219,7 @@ export default class SplitAction extends OsmChangeAction {
|
|||
// - `index`: closest point was found on nth line part,
|
||||
// - `dist`: distance between pt and the closest point,
|
||||
// `location`: distance along the line between start and the closest point.
|
||||
let projected = GeoOperations.nearestPoint(wayGeoJson, c)
|
||||
const projected = GeoOperations.nearestPoint(wayGeoJson, c)
|
||||
// c is lon lat
|
||||
return {
|
||||
coordinates: c,
|
||||
|
|
@ -232,8 +232,8 @@ export default class SplitAction extends OsmChangeAction {
|
|||
// We have a bunch of coordinates here: [ [lon, lon], [lat, lon], ...] ...
|
||||
// We project them onto the line (which should yield pretty much the same point and add them to allPoints
|
||||
for (let i = 0; i < originalPoints.length; i++) {
|
||||
let originalPoint = originalPoints[i]
|
||||
let projected = GeoOperations.nearestPoint(wayGeoJson, originalPoint)
|
||||
const originalPoint = originalPoints[i]
|
||||
const projected = GeoOperations.nearestPoint(wayGeoJson, originalPoint)
|
||||
allPoints.push({
|
||||
coordinates: originalPoint,
|
||||
isSplitPoint: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue