Fix ExportPage bounding box input

This commit is contained in:
Paul Bienkowski 2022-06-26 19:12:28 +02:00
parent e266a4f40a
commit a0852fdc41

View file

@ -30,6 +30,7 @@ const BoundingBoxSelector = React.forwardRef(
}, [point0, point1]); }, [point0, point1]);
React.useEffect(() => { React.useEffect(() => {
if(!value) return
const [p00, p01, p10, p11] = value const [p00, p01, p10, p11] = value
.split(",") .split(",")
.map((v) => Number.parseFloat(v)); .map((v) => Number.parseFloat(v));
@ -41,7 +42,7 @@ const BoundingBoxSelector = React.forwardRef(
return ( return (
<div> <div>
<Form.Input label="Bounding box" {...{ name, value, onChange }} /> <Form.Input label="Bounding box" {...{ name, value}} onChange={(e) => onChange(e.target.value)}/>
<div style={{ height: 400, position: "relative", marginBottom: 16 }}> <div style={{ height: 400, position: "relative", marginBottom: 16 }}>
<Map onClick={onClick}> <Map onClick={onClick}>