From d0cddd88f4f5c3cef7537048f55d7799211190c9 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 2 Jan 2022 12:47:20 +0100 Subject: [PATCH 1/3] disable drawing layer interactivity unless you are editing the layer --- packages/react-widgets/src/layers/DrawingToolLayer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-widgets/src/layers/DrawingToolLayer.js b/packages/react-widgets/src/layers/DrawingToolLayer.js index 829466ad7..ea9dc5a6a 100644 --- a/packages/react-widgets/src/layers/DrawingToolLayer.js +++ b/packages/react-widgets/src/layers/DrawingToolLayer.js @@ -52,6 +52,7 @@ export default function DrawingToolLayer() { return new EditableGeoJsonLayer({ id: 'DrawingToolLayer', + pickable: isEdit, data: { type: 'FeatureCollection', features: spatialFilterGeometry ? [spatialFilterGeometry] : [] From 241418abc5105254e18cc2194818ce804a96b6f7 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 2 Jan 2022 12:57:11 +0100 Subject: [PATCH 2/3] disable drawing layer interactivity unless you are editing or drawing --- packages/react-widgets/src/layers/DrawingToolLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-widgets/src/layers/DrawingToolLayer.js b/packages/react-widgets/src/layers/DrawingToolLayer.js index ea9dc5a6a..8923e6406 100644 --- a/packages/react-widgets/src/layers/DrawingToolLayer.js +++ b/packages/react-widgets/src/layers/DrawingToolLayer.js @@ -52,7 +52,7 @@ export default function DrawingToolLayer() { return new EditableGeoJsonLayer({ id: 'DrawingToolLayer', - pickable: isEdit, + pickable: !!selectedMode, data: { type: 'FeatureCollection', features: spatialFilterGeometry ? [spatialFilterGeometry] : [] From 8a031e59d90a8ac205d7b338db45b236f649b9b9 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 2 Jan 2022 13:04:36 +0100 Subject: [PATCH 3/3] change log --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07a88e6dc..d3ed1eb47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Not released +- Fix: DrawingToolLayer disables interactivity of the layers behind it [#263](https://github.com/CartoDB/carto-react/pull/263) + ## 1.2.0-alpha.0 (2021-12-30) - Track clientId for tracing purposes [#261](https://github.com/CartoDB/carto-react/pull/261)