From f9d4df39f9a7a1100fae94c80f5c5eb4152c8a1f Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Mon, 7 Feb 2022 02:12:51 +0100 Subject: [PATCH] Fix snapping --- UI/Input/LocationInput.ts | 1 - UI/NewPoint/ConfirmLocationOfPoint.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/UI/Input/LocationInput.ts b/UI/Input/LocationInput.ts index 501e176d07..269c0d74ae 100644 --- a/UI/Input/LocationInput.ts +++ b/UI/Input/LocationInput.ts @@ -148,7 +148,6 @@ export default class LocationInput extends InputElement implements MinimapO } ) this.leafletMap = this.map.leafletMap - this.bounds = this.map.bounds; this.location = this.map.location; } diff --git a/UI/NewPoint/ConfirmLocationOfPoint.ts b/UI/NewPoint/ConfirmLocationOfPoint.ts index d4cf22a202..aea36e0bc1 100644 --- a/UI/NewPoint/ConfirmLocationOfPoint.ts +++ b/UI/NewPoint/ConfirmLocationOfPoint.ts @@ -78,7 +78,7 @@ export default class ConfirmLocationOfPoint extends Combine { // return; } - bbox = bbox.pad(Math.max(preset.boundsFactor, 2), Math.max(preset.boundsFactor, 2)); + bbox = bbox.pad(Math.max(preset.boundsFactor ?? 0.25, 2), Math.max(preset.boundsFactor ?? 0.25, 2)); loadedBbox = bbox; const allFeatures: { feature: any }[] = [] preset.preciseInput.snapToLayers.forEach(layerId => {