@eeacms/volto-marine-policy 2.0.7 → 2.0.8
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [2.0.8](https://github.com/eea/volto-marine-policy/compare/2.0.7...2.0.8) - 16 April 2025
|
|
8
|
+
|
|
9
|
+
#### :house: Internal changes
|
|
10
|
+
|
|
11
|
+
- style: Automated code fix [eea-jenkins - [`c400842`](https://github.com/eea/volto-marine-policy/commit/c4008422b3480259c2a1101994c544b44e5b9002)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- eslint [laszlocseh - [`ebdba1e`](https://github.com/eea/volto-marine-policy/commit/ebdba1e06ed02f3bf03442dfd578f2c1db5b1241)]
|
|
16
|
+
- demo sites map viewer zoom improvements [laszlocseh - [`1680f64`](https://github.com/eea/volto-marine-policy/commit/1680f644f00e1bf62e1a5471aaf25a95d152ba05)]
|
|
7
17
|
### [2.0.7](https://github.com/eea/volto-marine-policy/compare/2.0.6...2.0.7) - 15 April 2025
|
|
8
18
|
|
|
9
19
|
#### :house: Internal changes
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ import InfoOverlay from './InfoOverlay';
|
|
|
9
9
|
import FeatureInteraction from './FeatureInteraction';
|
|
10
10
|
import { useMapContext } from '@eeacms/volto-openlayers-map/api';
|
|
11
11
|
|
|
12
|
-
import { centerAndResetMapZoom, getFeatures } from './utils';
|
|
12
|
+
import { centerAndResetMapZoom, getFeatures, zoomMapToFeatures } from './utils';
|
|
13
13
|
|
|
14
14
|
const styleCache = {};
|
|
15
15
|
const MapContextGateway = ({ setMap }) => {
|
|
@@ -60,11 +60,14 @@ export default function DemoSitesMap(props) {
|
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
React.useEffect(() => {
|
|
63
|
+
if (!map) return null;
|
|
64
|
+
|
|
63
65
|
if (activeItems) {
|
|
64
66
|
pointsSource.clear();
|
|
65
67
|
pointsSource.addFeatures(getFeatures(activeItems));
|
|
68
|
+
hideFilters && zoomMapToFeatures(map, getFeatures(activeItems));
|
|
66
69
|
}
|
|
67
|
-
}, [activeItems, pointsSource]);
|
|
70
|
+
}, [map, activeItems, pointsSource, hideFilters]);
|
|
68
71
|
|
|
69
72
|
React.useEffect(() => {
|
|
70
73
|
if (!map) return null;
|
|
@@ -134,7 +137,11 @@ export default function DemoSitesMap(props) {
|
|
|
134
137
|
onClick={() => {
|
|
135
138
|
// scrollToElement('search-input');
|
|
136
139
|
onSelectedCase(null);
|
|
137
|
-
|
|
140
|
+
if (hideFilters) {
|
|
141
|
+
zoomMapToFeatures(map, getFeatures(activeItems));
|
|
142
|
+
} else {
|
|
143
|
+
centerAndResetMapZoom(map);
|
|
144
|
+
}
|
|
138
145
|
map.getInteractions().array_[9].getFeatures().clear();
|
|
139
146
|
}}
|
|
140
147
|
>
|
|
@@ -78,24 +78,28 @@ export default function FeatureDisplay({ feature }) {
|
|
|
78
78
|
''
|
|
79
79
|
)} */}
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
81
|
+
{feature.indicators.length > 0 ? (
|
|
82
|
+
<div>
|
|
83
|
+
<span className="popup-title blue">Indicators</span>
|
|
84
|
+
<ul>
|
|
85
|
+
{feature.indicators.map((item, index) => {
|
|
86
|
+
return (
|
|
87
|
+
<li key={index}>
|
|
88
|
+
<a
|
|
89
|
+
target="_blank"
|
|
90
|
+
rel="noopener noreferrer"
|
|
91
|
+
href={item['path']}
|
|
92
|
+
>
|
|
93
|
+
{item['title']}
|
|
94
|
+
</a>
|
|
95
|
+
</li>
|
|
96
|
+
);
|
|
97
|
+
})}
|
|
98
|
+
</ul>
|
|
99
|
+
</div>
|
|
100
|
+
) : (
|
|
101
|
+
''
|
|
102
|
+
)}
|
|
99
103
|
{/* <div>
|
|
100
104
|
<h4>Indicators</h4>
|
|
101
105
|
<ul>
|
|
@@ -188,6 +188,7 @@ export function getFilters(cases, indicatorOnly) {
|
|
|
188
188
|
indicators.map((item) => {
|
|
189
189
|
if (
|
|
190
190
|
item['title'] &&
|
|
191
|
+
item['title'] !== '0' &&
|
|
191
192
|
!_filters.indicator_filter.hasOwnProperty('_' + item['id'])
|
|
192
193
|
) {
|
|
193
194
|
_filters.indicator_filter['_' + item['id']] = item['title'];
|