Constrain selections to active work areas
This commit is contained in:
@@ -1154,12 +1154,7 @@ export function MapWorkspace({
|
||||
}
|
||||
|
||||
const areaIdForSelection = (bbox: VectorSelectionBBox | null): string | undefined => (
|
||||
bbox
|
||||
&& selectedMapArea
|
||||
&& selectedAreaBbox
|
||||
&& bboxesEqual(bbox, selectedAreaBbox)
|
||||
? selectedMapArea.id
|
||||
: undefined
|
||||
bbox && selectedMapArea ? selectedMapArea.id : undefined
|
||||
)
|
||||
|
||||
const startBboxSelection = () => {
|
||||
@@ -1178,7 +1173,7 @@ export function MapWorkspace({
|
||||
setSelectionBbox(bbox)
|
||||
setFirstSelectionCorner(null)
|
||||
setBboxSelectionMode(false)
|
||||
void analyzeSelection(bbox)
|
||||
void analyzeSelection(bbox, areaIdForSelection(bbox))
|
||||
}
|
||||
|
||||
const runAreaExtract = () => {
|
||||
@@ -1387,7 +1382,7 @@ export function MapWorkspace({
|
||||
const handleMapBboxSelect = (bbox: VectorSelectionBBox) => {
|
||||
setFirstSelectionCorner(null)
|
||||
setBboxSelectionMode(false)
|
||||
void analyzeSelection(bbox)
|
||||
void analyzeSelection(bbox, areaIdForSelection(bbox))
|
||||
}
|
||||
|
||||
const runQuickAoiExtract = () => {
|
||||
|
||||
Reference in New Issue
Block a user