forked from MapComplete/MapComplete
Refactoring: move all code files into a src directory
This commit is contained in:
parent
de99f56ca8
commit
e75d2789d2
389 changed files with 0 additions and 12 deletions
14
src/Models/ThemeConfig/MoveConfig.ts
Normal file
14
src/Models/ThemeConfig/MoveConfig.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
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