From 2b141818d7500b5e67be3ae8dd97c65b709f8656 Mon Sep 17 00:00:00 2001 From: Pascal Roehling Date: Wed, 12 Feb 2025 21:47:50 +0100 Subject: [PATCH] Adjust isDrawing so directSelect works even when multiSelect is used --- packages/plugins/Gfi/CHANGELOG.md | 4 ++++ .../plugins/Gfi/src/store/actions/setupMultiSelection.ts | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/plugins/Gfi/CHANGELOG.md b/packages/plugins/Gfi/CHANGELOG.md index b8b9282b9..b3009d0b9 100644 --- a/packages/plugins/Gfi/CHANGELOG.md +++ b/packages/plugins/Gfi/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Fix: Adjust detection whether a user is drawing so that `directSelect` is not disabled when `multiSelect` is in use. + ## 3.0.0 - Breaking: Upgrade `@masterportal/masterportalapi` from `2.40.0` to `2.45.0` and subsequently `ol` from `^9.2.4` to `^10.3.1`. diff --git a/packages/plugins/Gfi/src/store/actions/setupMultiSelection.ts b/packages/plugins/Gfi/src/store/actions/setupMultiSelection.ts index 82e995253..e5622c287 100644 --- a/packages/plugins/Gfi/src/store/actions/setupMultiSelection.ts +++ b/packages/plugins/Gfi/src/store/actions/setupMultiSelection.ts @@ -15,9 +15,8 @@ const isDrawing = (map: Map) => .getArray() .some( (interaction) => - (interaction instanceof Draw && - // @ts-expect-error | internal hack to detect it from @polar/plugin-gfi and @polar/plugin-draw - (interaction._isMultiSelect || interaction._isDrawPlugin)) || + // @ts-expect-error | internal hack to detect it from @polar/plugin-draw + (interaction instanceof Draw && interaction._isDrawPlugin) || interaction instanceof Modify || // @ts-expect-error | internal hack to detect it from @polar/plugin-draw interaction._isDeleteSelect ||