mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
implemented backend for storing starting area
This commit is contained in:
@@ -41,6 +41,13 @@ export function CircularAreaPicker({area, setArea, ...props}) {
|
||||
const [center, setCenter] = useState(area?.center || null);
|
||||
const [radius, setRadius] = useState(area?.radius || null);
|
||||
|
||||
useEffect(() => {
|
||||
console.log(area)
|
||||
setDrawing(false);
|
||||
setCenter(area?.center || null);
|
||||
setRadius(area?.radius || null);
|
||||
}, [area])
|
||||
|
||||
function handleClick(e) {
|
||||
if(!drawing) {
|
||||
setCenter(e.latlng);
|
||||
|
||||
Reference in New Issue
Block a user