Skip to content

Commit 035fdfc

Browse files
committed
add(survolProduit): affichage du nom de la dalle au survol #12
1 parent b953827 commit 035fdfc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/hooks/Maps/useMap.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,16 @@ export const useMap = (
106106
mapInstance.addInteraction(clickInteraction);
107107
clickInteraction.setActive(true);
108108

109-
const hoverInteraction = new HoverPopupInteraction({
109+
const hoverInteractionChantier = new HoverPopupInteraction({
110110
layer: chantierLayer,
111111
});
112-
mapInstance.addInteraction(hoverInteraction);
112+
mapInstance.addInteraction(hoverInteractionChantier);
113+
114+
115+
const hoverInteractionProduit = new HoverPopupInteraction({
116+
layer: produitLayer,
117+
});
118+
mapInstance.addInteraction(hoverInteractionProduit);
113119

114120
// ⚡ bascule entre les interactions selon selectionMode
115121
useMapStore.subscribe((state) => {

0 commit comments

Comments
 (0)