Make 'allowMove' obligatory
This commit is contained in:
parent
48a87aa52f
commit
f304a02c46
5 changed files with 33 additions and 11 deletions
|
@ -203,6 +203,7 @@ export default class CreateNoteImportLayer extends Conversion<LayerConfigJson, L
|
|||
anchor: "center",
|
||||
},
|
||||
],
|
||||
allowMove: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,6 +141,16 @@ export class PrevalidateLayer extends DesugaringStep<LayerConfigJson> {
|
|||
}
|
||||
}
|
||||
|
||||
if(json.allowMove === undefined){
|
||||
if (!Constants.priviliged_layers.find((x) => x == json.id)) {
|
||||
context.err(
|
||||
"Layer " +
|
||||
json.id +
|
||||
" does not have an explicit 'allowMove'"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (context.hasErrors()) {
|
||||
return undefined
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue