@geops/rvf-mobility-web-component 0.1.113 → 0.1.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@geops/rvf-mobility-web-component",
3
3
  "license": "UNLICENSED",
4
4
  "description": "Web components for rvf in the domains of mobility and logistics.",
5
- "version": "0.1.113",
5
+ "version": "0.1.114",
6
6
  "homepage": "https://rvf-mobility-web-component.vercel.app/",
7
7
  "type": "module",
8
8
  "main": "index.js",
@@ -34,7 +34,14 @@ function FeaturesInfosListener() {
34
34
  return info.layer === notificationsLayer;
35
35
  })?.features || [];
36
36
 
37
- const priorityFeature = notificationFeature || realtimeFeature;
37
+ // We prioritize only symbol notifications, becaus ewe want to be able to click on trians on lines
38
+ const isSymbolNotification =
39
+ notificationFeature?.getGeometry()?.getType() === "Point";
40
+
41
+ const priorityFeature = isSymbolNotification
42
+ ? notificationFeature || realtimeFeature
43
+ : realtimeFeature || notificationFeature;
44
+
38
45
  if (priorityFeature === realtimeFeature) {
39
46
  realtimeLayer?.highlight(realtimeFeature);
40
47
  } else {
@@ -77,8 +84,15 @@ function FeaturesInfosListener() {
77
84
  return info.features;
78
85
  }) || [];
79
86
 
80
- const priorityFeature =
81
- notificationFeature || realtimeFeature || stationFeature;
87
+ // We prioritize only symbol notifications, becaus ewe want to be able to click on trians on lines
88
+ const isSymbolNotification =
89
+ notificationFeature?.getGeometry()?.getType() === "Point";
90
+
91
+ let priorityFeature = isSymbolNotification
92
+ ? notificationFeature || realtimeFeature
93
+ : realtimeFeature || notificationFeature;
94
+
95
+ priorityFeature = priorityFeature || stationFeature;
82
96
 
83
97
  // TODO this if/else must be refactored. We should not have to do setLinesIds here
84
98
  if (priorityFeature) {