Make 'allowMove' obligatory

This commit is contained in:
Pieter Vander Vennet 2024-09-02 10:29:01 +02:00
parent 48a87aa52f
commit f304a02c46
5 changed files with 33 additions and 11 deletions

View file

@ -203,6 +203,7 @@ export default class CreateNoteImportLayer extends Conversion<LayerConfigJson, L
anchor: "center",
},
],
allowMove: false
}
}
}

View file

@ -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
}