@eeacms/volto-arcgis-block 0.1.235 → 0.1.236

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,11 @@ 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
+ ### [0.1.236](https://github.com/eea/volto-arcgis-block/compare/0.1.235...0.1.236) - 20 November 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`f45d4bf`](https://github.com/eea/volto-arcgis-block/commit/f45d4bf42061d13d9c18554bef692cb40b3a6fb7)]
7
12
  ### [0.1.235](https://github.com/eea/volto-arcgis-block/compare/0.1.234...0.1.235) - 16 November 2023
8
13
 
9
14
  ### [0.1.234](https://github.com/eea/volto-arcgis-block/compare/0.1.233...0.1.234) - 15 November 2023
package/Jenkinsfile CHANGED
@@ -1,4 +1,7 @@
1
1
  pipeline {
2
+ tools {
3
+ jdk 'Java17'
4
+ }
2
5
  agent any
3
6
 
4
7
  environment {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.235",
3
+ "version": "0.1.236",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -75,10 +75,10 @@ class SwipeWidget extends React.Component {
75
75
  this.map.layers.on('change', () => {
76
76
  if (this.hasSwipe) {
77
77
  this.map.layers.removeAll();
78
- if (this.swipe.leadingLayers.items[0]) {
78
+ if (this.swipe.leadingLayers && this.swipe.leadingLayers.items[0]) {
79
79
  this.map.layers.add(this.swipe.leadingLayers.items[0]);
80
80
  }
81
- if (this.swipe.trailingLayers.items[0]) {
81
+ if (this.swipe.trailingLayers && this.swipe.trailingLayers.items[0]) {
82
82
  this.map.layers.add(this.swipe.trailingLayers.items[0]);
83
83
  }
84
84
  }
@@ -162,49 +162,53 @@ class SwipeWidget extends React.Component {
162
162
  layerId = this.layers['pa_filter'].id;
163
163
  }
164
164
  }
165
- if (
166
- this.swipe.leadingLayers &&
167
- this.swipe.leadingLayers.items[0] &&
168
- this.swipe.leadingLayers.items[0].id === layerId
169
- ) {
170
- selectLeadingLayer.options.add(
171
- new Option(
172
- this.getLayerTitle(this.layers[layer]),
173
- layerId,
174
- true,
175
- true,
176
- ),
177
- );
178
- } else {
179
- selectLeadingLayer.options.add(
180
- new Option(
181
- this.getLayerTitle(this.layers[layer]),
182
- layerId,
183
- false,
184
- ),
185
- );
165
+ if (selectLeadingLayer) {
166
+ if (
167
+ this.swipe.leadingLayers &&
168
+ this.swipe.leadingLayers.items[0] &&
169
+ this.swipe.leadingLayers.items[0].id === layerId
170
+ ) {
171
+ selectLeadingLayer.options.add(
172
+ new Option(
173
+ this.getLayerTitle(this.layers[layer]),
174
+ layerId,
175
+ true,
176
+ true,
177
+ ),
178
+ );
179
+ } else {
180
+ selectLeadingLayer.options.add(
181
+ new Option(
182
+ this.getLayerTitle(this.layers[layer]),
183
+ layerId,
184
+ false,
185
+ ),
186
+ );
187
+ }
186
188
  }
187
- if (
188
- this.swipe.trailingLayers &&
189
- this.swipe.trailingLayers.items[0] &&
190
- this.swipe.trailingLayers.items[0].id === layerId
191
- ) {
192
- selectTrailingLayer.options.add(
193
- new Option(
194
- this.getLayerTitle(this.layers[layer]),
195
- layerId,
196
- true,
197
- true,
198
- ),
199
- );
200
- } else {
201
- selectTrailingLayer.options.add(
202
- new Option(
203
- this.getLayerTitle(this.layers[layer]),
204
- layerId,
205
- false,
206
- ),
207
- );
189
+ if (selectTrailingLayer) {
190
+ if (
191
+ this.swipe.trailingLayers &&
192
+ this.swipe.trailingLayers.items[0] &&
193
+ this.swipe.trailingLayers.items[0].id === layerId
194
+ ) {
195
+ selectTrailingLayer.options.add(
196
+ new Option(
197
+ this.getLayerTitle(this.layers[layer]),
198
+ layerId,
199
+ true,
200
+ true,
201
+ ),
202
+ );
203
+ } else {
204
+ selectTrailingLayer.options.add(
205
+ new Option(
206
+ this.getLayerTitle(this.layers[layer]),
207
+ layerId,
208
+ false,
209
+ ),
210
+ );
211
+ }
208
212
  }
209
213
  }
210
214
  });