Skip to content

Commit

Permalink
Merge pull request #656 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Urkorue committed Nov 20, 2023
2 parents c40ab44 + 0ceacc3 commit 2ae5725
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 45 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [0.1.236](https://github.com/eea/volto-arcgis-block/compare/0.1.235...0.1.236) - 20 November 2023

#### :hammer_and_wrench: Others

- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`f45d4bf`](https://github.com/eea/volto-arcgis-block/commit/f45d4bf42061d13d9c18554bef692cb40b3a6fb7)]
### [0.1.235](https://github.com/eea/volto-arcgis-block/compare/0.1.234...0.1.235) - 16 November 2023

### [0.1.234](https://github.com/eea/volto-arcgis-block/compare/0.1.233...0.1.234) - 15 November 2023
Expand Down
3 changes: 3 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
pipeline {
tools {
jdk 'Java17'
}
agent any

environment {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-arcgis-block",
"version": "0.1.235",
"version": "0.1.236",
"description": "volto-arcgis-block: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: CodeSyntax",
Expand Down
92 changes: 48 additions & 44 deletions src/components/MapViewer/SwipeWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ class SwipeWidget extends React.Component {
this.map.layers.on('change', () => {
if (this.hasSwipe) {
this.map.layers.removeAll();
if (this.swipe.leadingLayers.items[0]) {
if (this.swipe.leadingLayers && this.swipe.leadingLayers.items[0]) {
this.map.layers.add(this.swipe.leadingLayers.items[0]);
}
if (this.swipe.trailingLayers.items[0]) {
if (this.swipe.trailingLayers && this.swipe.trailingLayers.items[0]) {
this.map.layers.add(this.swipe.trailingLayers.items[0]);
}
}
Expand Down Expand Up @@ -162,49 +162,53 @@ class SwipeWidget extends React.Component {
layerId = this.layers['pa_filter'].id;
}
}
if (
this.swipe.leadingLayers &&
this.swipe.leadingLayers.items[0] &&
this.swipe.leadingLayers.items[0].id === layerId
) {
selectLeadingLayer.options.add(
new Option(
this.getLayerTitle(this.layers[layer]),
layerId,
true,
true,
),
);
} else {
selectLeadingLayer.options.add(
new Option(
this.getLayerTitle(this.layers[layer]),
layerId,
false,
),
);
if (selectLeadingLayer) {
if (
this.swipe.leadingLayers &&
this.swipe.leadingLayers.items[0] &&
this.swipe.leadingLayers.items[0].id === layerId
) {
selectLeadingLayer.options.add(
new Option(
this.getLayerTitle(this.layers[layer]),
layerId,
true,
true,
),
);
} else {
selectLeadingLayer.options.add(
new Option(
this.getLayerTitle(this.layers[layer]),
layerId,
false,
),
);
}
}
if (
this.swipe.trailingLayers &&
this.swipe.trailingLayers.items[0] &&
this.swipe.trailingLayers.items[0].id === layerId
) {
selectTrailingLayer.options.add(
new Option(
this.getLayerTitle(this.layers[layer]),
layerId,
true,
true,
),
);
} else {
selectTrailingLayer.options.add(
new Option(
this.getLayerTitle(this.layers[layer]),
layerId,
false,
),
);
if (selectTrailingLayer) {
if (
this.swipe.trailingLayers &&
this.swipe.trailingLayers.items[0] &&
this.swipe.trailingLayers.items[0].id === layerId
) {
selectTrailingLayer.options.add(
new Option(
this.getLayerTitle(this.layers[layer]),
layerId,
true,
true,
),
);
} else {
selectTrailingLayer.options.add(
new Option(
this.getLayerTitle(this.layers[layer]),
layerId,
false,
),
);
}
}
}
});
Expand Down

0 comments on commit 2ae5725

Please sign in to comment.