forked from MapComplete/MapComplete
Add move option, enable move and delete option on most layers
This commit is contained in:
parent
0a3eb966c1
commit
7e2b73ac5d
33 changed files with 454 additions and 104 deletions
17
Models/ThemeConfig/MoveConfig.ts
Normal file
17
Models/ThemeConfig/MoveConfig.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import MoveConfigJson from "./Json/MoveConfigJson";
|
||||
|
||||
export default class MoveConfig {
|
||||
|
||||
public readonly enableImproveAccuracy: boolean
|
||||
public readonly enableRelocation: boolean
|
||||
|
||||
constructor(json: MoveConfigJson, context: string) {
|
||||
this.enableImproveAccuracy = json.enableImproveAccuracy ?? true
|
||||
this.enableRelocation = json.enableRelocation ?? true
|
||||
if (!(this.enableRelocation || this.enableImproveAccuracy)) {
|
||||
throw "At least one default move reason should be allowed (at " + context + ")"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue