@eeacms/volto-arcgis-block 0.1.212 → 0.1.213

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,8 @@ 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.213](https://github.com/eea/volto-arcgis-block/compare/0.1.212...0.1.213) - 4 October 2023
8
+
7
9
  ### [0.1.212](https://github.com/eea/volto-arcgis-block/compare/0.1.211...0.1.212) - 4 October 2023
8
10
 
9
11
  ### [0.1.211](https://github.com/eea/volto-arcgis-block/compare/0.1.210...0.1.211) - 4 October 2023
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.212",
3
+ "version": "0.1.213",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -88,13 +88,13 @@ class SwipeWidget extends React.Component {
88
88
  await this.loader();
89
89
  this.swipe = new Swipe({
90
90
  view: this.props.view,
91
+ direction: 'horizontal',
91
92
  position: 50,
92
93
  });
93
94
  }
94
-
95
95
  getLayerTitle(layer) {
96
96
  let title;
97
- if (layer.url.toLowerCase().includes('wmts')) {
97
+ if (layer.url && layer.url.toLowerCase().includes('wmts')) {
98
98
  title = layer._wmtsTitle;
99
99
  } else {
100
100
  if (layer.sublayers) {
@@ -148,8 +148,12 @@ class SwipeWidget extends React.Component {
148
148
  .value;
149
149
  let selectedTrailingLayer = document.getElementById('select-trailing-layer')
150
150
  .value;
151
+ let selectedSwipeDirection = document.getElementById(
152
+ 'select-swipe-direction',
153
+ ).value;
151
154
  this.swipe.leadingLayers.removeAll();
152
155
  this.swipe.trailingLayers.removeAll();
156
+ this.swipe.direction = selectedSwipeDirection;
153
157
  this.map.layers.forEach((layer) => {
154
158
  layer.visible = false;
155
159
  if (layer.id === selectedLeadingLayer) {
@@ -219,6 +223,12 @@ class SwipeWidget extends React.Component {
219
223
  <span>Trailing Layer</span>
220
224
  <select id="select-trailing-layer" class="esri-select"></select>
221
225
  <br></br>
226
+ <span>Swipe Direction</span>
227
+ <select id="select-swipe-direction" class="esri-select">
228
+ <option value="horizontal">Horizontal</option>
229
+ <option value="vertical">Vertical</option>
230
+ </select>
231
+ <br></br>
222
232
  <button
223
233
  id="applySwipeButton"
224
234
  class="esri-button"