Fix map interface controls not showing (#7812)

This commit is contained in:
Oreille
2021-09-03 18:08:31 +02:00
committed by GitHub
parent 1c1215b04e
commit 44ff1484f6

View File

@@ -239,6 +239,16 @@ export default defineComponent({
loadValueFromProps();
}
);
watch(
() => props.disabled,
() => {
map.removeControl(controls.draw);
controls.draw = new MapboxDraw(getDrawOptions(geometryType));
map.addControl(controls.draw as IControl, 'top-left');
loadValueFromProps();
}
);
}
function resetValue(hard: boolean) {