diff --git a/src/ClientApp/src/components/BohrungForm.js b/src/ClientApp/src/components/BohrungForm.js index 25647b4..40832aa 100644 --- a/src/ClientApp/src/components/BohrungForm.js +++ b/src/ClientApp/src/components/BohrungForm.js @@ -405,6 +405,7 @@ export default function BohrungForm(props) { currentStandort={currentStandort} currentForm={"bohrung"} setCurrentBohrung={setCurrentBohrung} + readOnly={readOnly} > diff --git a/src/ClientApp/src/components/DetailMap.js b/src/ClientApp/src/components/DetailMap.js index 3f868f3..966e774 100644 --- a/src/ClientApp/src/components/DetailMap.js +++ b/src/ClientApp/src/components/DetailMap.js @@ -14,7 +14,7 @@ import { Style, Circle, Fill, Stroke } from "ol/style"; import "ol/ol.css"; export default function DetailMap(props) { - const { bohrungen, currentStandort, currentForm, setCurrentBohrung } = props; + const { bohrungen, currentStandort, currentForm, setCurrentBohrung, readOnly } = props; const [map, setMap] = useState(); const [bohrungenLayer, setBohrungenLayer] = useState(); const [geometrie, setGeometrie] = useState(); @@ -62,7 +62,7 @@ export default function DetailMap(props) { }); // Allow editing of geometry if map is displayed in bohrung form. - if (currentForm === "bohrung") { + if (currentForm === "bohrung" && !readOnly) { initialMap.on("singleclick", function (evt) { setGeometrie({ type: "Point", coordinates: evt.coordinate }); });