Skip to content

Commit

Permalink
add initial center prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane98c committed Mar 25, 2024
1 parent 9fa3ee3 commit 2d34f9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/region/region-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ function RegionPicker({
fontSize,
units = 'kilometers',
initialRadius: initialRadiusProp,
initialCenter: initialCenterProp,
minRadius,
maxRadius,
}) {
const { map } = useMapbox()
const id = useRef(uuidv4())
const initialCenter = useRef(map.getCenter())
const initialCenter = useRef(initialCenterProp || map.getCenter())
const initialRadius = useRef(
initialRadiusProp || getInitialRadius(map, units, minRadius, maxRadius)
)
Expand Down

0 comments on commit 2d34f9d

Please sign in to comment.