From fe0897bc1495db54363c09e908f0f5234b8beba5 Mon Sep 17 00:00:00 2001 From: Damien SOREL Date: Thu, 20 Jul 2023 12:51:38 +0200 Subject: [PATCH] Fix #1017 map: hotspot click when the map is closed --- packages/map-plugin/src/components/MapComponent.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/map-plugin/src/components/MapComponent.ts b/packages/map-plugin/src/components/MapComponent.ts index 50a59ab0c..f80a1adb6 100644 --- a/packages/map-plugin/src/components/MapComponent.ts +++ b/packages/map-plugin/src/components/MapComponent.ts @@ -172,7 +172,7 @@ export class MapComponent extends AbstractComponent { if (this.state.mousedown) { this.__move(event.clientX, event.clientY); e.stopPropagation(); - } else { + } else if (!this.state.collapsed) { this.__handleHotspots(event.clientX, event.clientY); } break; @@ -205,7 +205,9 @@ export class MapComponent extends AbstractComponent { this.state.mousedown = false; e.stopPropagation(); } - this.__clickHotspot(mouse.clientX, mouse.clientY); + if (!this.state.collapsed) { + this.__clickHotspot(mouse.clientX, mouse.clientY); + } break; } case 'wheel': {