Skip to content

Commit

Permalink
Console logging while debugging, please revert
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceR committed Nov 7, 2024
1 parent ea2634c commit 17361f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ function CustomAoI({
// Needed so that this component re-renders to when the draw selection changes
// from feature to point.
const [, forceUpdate] = useState(0);
console.log("selectedForEditing:", selectedForEditing);
useEffect(() => {
const mbDraw = map?._drawControl;
if (!mbDraw) return;
console.log("use Effect is not triggered! selectedForEditing:", selectedForEditing);
const aoiSelectedFor = selectedForEditing ? SIMPLE_SELECT : STATIC_MODE;
mbDraw.changeMode(aoiSelectedFor);
const onSelChange = () => forceUpdate(Date.now());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default function useAois() {

const onSelectionChange = useCallback(
(e) => {
console.log('onSelectionChange:', e);
const selectedIds = e.features.map((f) => toAoIid(f.id));
aoiSetSelected(selectedIds);
},
Expand Down

0 comments on commit 17361f3

Please sign in to comment.