Add long-hold/right-click behaviour to add a point (e.g. in an already existing polygon)

This commit is contained in:
Pieter Vander Vennet 2020-09-05 18:40:16 +02:00
parent 9e9d80c045
commit 38f2242426
2 changed files with 7 additions and 1 deletions

View file

@ -114,6 +114,12 @@ export class Basemap {
this.map.on("click", function (e) {
self.LastClickLocation.setData({lat: e.latlng.lat, lon: e.latlng.lng})
});
this.map.on("contextmenu", function (e) {
self.LastClickLocation.setData({lat: e.latlng.lat, lon: e.latlng.lng});
console.log("Right click")
e.preventDefault();
});
}
}

View file

@ -23,7 +23,7 @@ export class State {
// The singleton of the global state
public static state: State;
public static vNumber = "0.0.7g";
public static vNumber = "0.0.7h";
// The user journey states thresholds when a new feature gets unlocked
public static userJourney = {