@eeacms/volto-arcgis-block 0.1.321 → 0.1.323
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 +12 -1
- package/package.json +1 -1
- package/src/components/MapViewer/AreaWidget.jsx +3 -3
- package/src/components/MapViewer/HotspotWidget.jsx +14 -14
- package/src/components/MapViewer/InfoWidget.jsx +17 -15
- package/src/components/MapViewer/LoadingSpinner.jsx +6 -6
- package/src/components/MapViewer/MapViewer.jsx +14 -24
- package/src/components/MapViewer/MenuWidget.jsx +146 -151
- package/src/components/MapViewer/PrintWidget.jsx +6 -6
- package/src/components/MapViewer/ScaleWidget.jsx +6 -6
- package/src/components/MapViewer/SwipeWidget.jsx +10 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +4,21 @@ 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.
|
|
7
|
+
### [0.1.323](https://github.com/eea/volto-arcgis-block/compare/0.1.322...0.1.323) - 10 December 2024
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
+
- CLMS-3264 (bug): datasets that cannot be visualized in the data viewer can still be downloaded from the data viewer. [Unai Bolivar - [`66d28fc`](https://github.com/eea/volto-arcgis-block/commit/66d28fcc303dba6be7495143833ef1f5d398327e)]
|
|
12
|
+
### [0.1.322](https://github.com/eea/volto-arcgis-block/compare/0.1.321...0.1.322) - 10 December 2024
|
|
13
|
+
|
|
14
|
+
#### :hammer_and_wrench: Others
|
|
15
|
+
|
|
16
|
+
- CLMS-DATA-VIEWER-CRASH-PATCH (BUG): Patch disabling lazyloading for info widget. [Unai Bolivar - [`f347c17`](https://github.com/eea/volto-arcgis-block/commit/f347c1783bef80f3ad7a028db1a875bb475fc67c)]
|
|
17
|
+
### [0.1.321](https://github.com/eea/volto-arcgis-block/compare/0.1.320...0.1.321) - 10 December 2024
|
|
18
|
+
|
|
19
|
+
#### :hammer_and_wrench: Others
|
|
20
|
+
|
|
21
|
+
- Merge pull request #857 from eea/develop [Unai Bolivar - [`95bc2c7`](https://github.com/eea/volto-arcgis-block/commit/95bc2c73ec16745423c0fd9969e97fce4e6c4aa5)]
|
|
11
22
|
- CLMS-3264 (bug): Downloading map image layer datasets functions correctly. [Unai Bolivar - [`e11271c`](https://github.com/eea/volto-arcgis-block/commit/e11271c7ec621231207ca3069b6470f814eea7e2)]
|
|
12
23
|
- CLMS-3264 (bug): pointing to correct db. Resetting local host to run tests. Saving before hand. [Unai Bolivar - [`3dca534`](https://github.com/eea/volto-arcgis-block/commit/3dca5348668b69b7fa65b39371d28e4111e0b2e8)]
|
|
13
24
|
### [0.1.320](https://github.com/eea/volto-arcgis-block/compare/0.1.319...0.1.320) - 9 December 2024
|
package/package.json
CHANGED
|
@@ -394,9 +394,9 @@ class AreaWidget extends React.Component {
|
|
|
394
394
|
default:
|
|
395
395
|
break;
|
|
396
396
|
}
|
|
397
|
-
setTimeout(() => {
|
|
398
|
-
|
|
399
|
-
}, 2000);
|
|
397
|
+
// setTimeout(() => {
|
|
398
|
+
e.target.value = null;
|
|
399
|
+
// }, 2000);
|
|
400
400
|
this.props.uploadFileHandler(this.state.infoPopupType);
|
|
401
401
|
};
|
|
402
402
|
|
|
@@ -969,20 +969,20 @@ class HotspotWidget extends React.Component {
|
|
|
969
969
|
Object.keys(bookmarkHotspotFilter?.filteredLayers).length !== 0 &&
|
|
970
970
|
this.props.bookmarkData.active === true
|
|
971
971
|
) {
|
|
972
|
-
setTimeout(() => {
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
}, 2000);
|
|
972
|
+
// setTimeout(() => {
|
|
973
|
+
let activeLayers = [];
|
|
974
|
+
let filteredLayers = [];
|
|
975
|
+
Object.keys(bookmarkHotspotFilter.activeLayers).forEach((key) => {
|
|
976
|
+
activeLayers[key] = this.layers[key];
|
|
977
|
+
});
|
|
978
|
+
Object.keys(bookmarkHotspotFilter.filteredLayers).forEach((key) => {
|
|
979
|
+
filteredLayers[key] = null;
|
|
980
|
+
});
|
|
981
|
+
this.props.hotspotData['activeLayers'] = activeLayers;
|
|
982
|
+
this.props.hotspotData['filteredLayers'] = filteredLayers;
|
|
983
|
+
this.renderApplyFilterButton();
|
|
984
|
+
localStorage.setItem('bookmarkHotspotFilter', null);
|
|
985
|
+
// }, 2000);
|
|
986
986
|
} else if (
|
|
987
987
|
bookmarkHotspotFilter !== null &&
|
|
988
988
|
Object.keys(bookmarkHotspotFilter?.filteredLayers).length === 0 &&
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React, { createRef } from 'react';
|
|
2
2
|
import { loadModules } from 'esri-loader';
|
|
3
3
|
import { Loader } from 'semantic-ui-react';
|
|
4
|
-
import loadable from '@loadable/component';
|
|
5
|
-
import { injectLazyLibs } from '@plone/volto/helpers/Loadable';
|
|
6
|
-
|
|
7
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
4
|
+
// import loadable from '@loadable/component';
|
|
5
|
+
// import { injectLazyLibs } from '@plone/volto/helpers/Loadable';
|
|
6
|
+
import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
import Highcharts from 'highcharts';
|
|
9
|
+
// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
var GeometryEngine, Graphic, esriRequest;
|
|
12
12
|
|
|
13
|
-
const HighchartsReact = loadable(() => import('highcharts-react-official'));
|
|
13
|
+
// const HighchartsReact = loadable(() => import('highcharts-react-official'));
|
|
14
14
|
|
|
15
15
|
class InfoWidget extends React.Component {
|
|
16
16
|
/**
|
|
@@ -87,12 +87,12 @@ class InfoWidget extends React.Component {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
waitForContainer(mapdiv) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
90
|
+
// waitForContainer(mapdiv) {
|
|
91
|
+
// while (mapdiv === null) {
|
|
92
|
+
// new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms
|
|
93
|
+
// }
|
|
94
|
+
// return mapdiv;
|
|
95
|
+
// }
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* This method is executed after the rener method is executed
|
|
@@ -1156,7 +1156,8 @@ class InfoWidget extends React.Component {
|
|
|
1156
1156
|
{this.state.pixelInfo && !noData && (
|
|
1157
1157
|
<>
|
|
1158
1158
|
{this.loadVariableSelector(this.state.layerIndex)}
|
|
1159
|
-
<HighchartsReact
|
|
1159
|
+
{/* <HighchartsReact */}
|
|
1160
|
+
<Highcharts
|
|
1160
1161
|
highcharts={this.Highcharts}
|
|
1161
1162
|
options={this.loadInfoChart(this.state.layerIndex)}
|
|
1162
1163
|
/>
|
|
@@ -1196,4 +1197,5 @@ class InfoWidget extends React.Component {
|
|
|
1196
1197
|
}
|
|
1197
1198
|
}
|
|
1198
1199
|
|
|
1199
|
-
export default injectLazyLibs('highcharts')(InfoWidget);
|
|
1200
|
+
// export default injectLazyLibs('highcharts')(InfoWidget);
|
|
1201
|
+
export default InfoWidget;
|
|
@@ -54,12 +54,12 @@ class LoadingSpinner extends React.Component {
|
|
|
54
54
|
this.setState({});
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
waitForContainer(mapdiv) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
57
|
+
// waitForContainer(mapdiv) {
|
|
58
|
+
// while (mapdiv === null) {
|
|
59
|
+
// new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms
|
|
60
|
+
// }
|
|
61
|
+
// return mapdiv;
|
|
62
|
+
// }
|
|
63
63
|
|
|
64
64
|
async componentDidMount() {
|
|
65
65
|
//this.waitForContainer(this.props.view);
|
|
@@ -57,7 +57,6 @@ class MapViewer extends React.Component {
|
|
|
57
57
|
layerLoading: false,
|
|
58
58
|
layers: {},
|
|
59
59
|
uploadedFile: true,
|
|
60
|
-
//isReady: false,
|
|
61
60
|
};
|
|
62
61
|
this.activeLayersHandler = this.activeLayersHandler.bind(this);
|
|
63
62
|
this.activeLayersArray = {};
|
|
@@ -157,35 +156,26 @@ class MapViewer extends React.Component {
|
|
|
157
156
|
* they are already mounted
|
|
158
157
|
*/
|
|
159
158
|
|
|
160
|
-
waitForDataFill(obj) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
159
|
+
// waitForDataFill(obj) {
|
|
160
|
+
// while (obj.length === 0) {
|
|
161
|
+
// new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms
|
|
162
|
+
// }
|
|
163
|
+
// return obj;
|
|
164
|
+
// }
|
|
166
165
|
|
|
167
|
-
waitForContainer(mapdiv) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
166
|
+
// waitForContainer(mapdiv) {
|
|
167
|
+
// while (mapdiv === null) {
|
|
168
|
+
// new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms
|
|
169
|
+
// }
|
|
170
|
+
// return mapdiv;
|
|
171
|
+
// }
|
|
173
172
|
|
|
174
173
|
async componentDidMount() {
|
|
175
174
|
loadCss();
|
|
176
175
|
await this.loader();
|
|
177
176
|
// this.state.url = window.location.href;
|
|
178
|
-
await this.waitForDataFill(this.compCfg);
|
|
179
|
-
|
|
180
|
-
//this.props.view.when(() => {
|
|
181
|
-
// this.props.view.ui.add(this.container.current, 'top-right');
|
|
182
|
-
//});
|
|
183
|
-
//this.intervalId = setInterval(() => {
|
|
184
|
-
// if (this.mapdiv.current !== null) {
|
|
185
|
-
// this.setState({ isReady: true });
|
|
186
|
-
// clearInterval(this.intervalId);
|
|
187
|
-
// }
|
|
188
|
-
//}, 100);
|
|
177
|
+
// await this.waitForDataFill(this.compCfg);
|
|
178
|
+
|
|
189
179
|
this.positronCompositeBasemap = new Basemap({
|
|
190
180
|
title: 'Positron composite',
|
|
191
181
|
thumbnailUrl: this.cfgUrls.positronCompositeThumbnail,
|
|
@@ -92,7 +92,7 @@ export const AddCartItem = ({
|
|
|
92
92
|
let areaExtent = null;
|
|
93
93
|
let check = document.querySelector('.area-panel input:checked')?.value;
|
|
94
94
|
let fileUpload = sessionStorage.getItem('fileUploadLayer') ? true : false;
|
|
95
|
-
let isMapServer = dataset
|
|
95
|
+
let isMapServer = dataset?.ViewService?.toLowerCase().endsWith('/mapserver')
|
|
96
96
|
? true
|
|
97
97
|
: false;
|
|
98
98
|
if (check === 'area' || fileUpload) {
|
|
@@ -681,155 +681,124 @@ class MenuWidget extends React.Component {
|
|
|
681
681
|
* and close actions of the component
|
|
682
682
|
*/
|
|
683
683
|
openMenu() {
|
|
684
|
-
setTimeout(() => {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
if (
|
|
699
|
-
document.querySelector('.opacity-panel').style.display === 'block'
|
|
700
|
-
) {
|
|
701
|
-
this.closeOpacity();
|
|
702
|
-
}
|
|
684
|
+
// setTimeout(() => {
|
|
685
|
+
if (this.state.showMapMenu) {
|
|
686
|
+
this.container.current.querySelector('#tabcontainer').style.display =
|
|
687
|
+
'none';
|
|
688
|
+
this.container.current.querySelector('#paneles').style.display = 'none';
|
|
689
|
+
this.container.current
|
|
690
|
+
.querySelector('.esri-widget--button')
|
|
691
|
+
.classList.replace('esri-icon-close', 'esri-icon-drag-horizontal');
|
|
692
|
+
if (document.contains(document.querySelector('.timeslider-container'))) {
|
|
693
|
+
document.querySelector('.timeslider-container').style.display = 'none';
|
|
694
|
+
}
|
|
695
|
+
if (document.querySelector('.opacity-panel').style.display === 'block') {
|
|
696
|
+
this.closeOpacity();
|
|
697
|
+
}
|
|
703
698
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
699
|
+
// By invoking the setState, we notify the state we want to reach
|
|
700
|
+
// and ensure that the component is rendered again
|
|
701
|
+
this.setState({ showMapMenu: false });
|
|
702
|
+
} else {
|
|
703
|
+
/*
|
|
709
704
|
The following variables have been changed from container
|
|
710
705
|
to this.container.current to avoid data viewer crash
|
|
711
706
|
when client comes from dataset / product pages or refreshing
|
|
712
707
|
*/
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
708
|
+
const tabContainer = this.container.current.querySelector(
|
|
709
|
+
'#tabcontainer',
|
|
710
|
+
);
|
|
711
|
+
const paneles = this.container.current.querySelector('#paneles');
|
|
712
|
+
const esriWidgetButton = this.container.current.querySelector(
|
|
713
|
+
'.esri-widget--button',
|
|
714
|
+
);
|
|
715
|
+
const timeSliderContainer = document.querySelector(
|
|
716
|
+
'.timeslider-container',
|
|
717
|
+
);
|
|
723
718
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
719
|
+
if (tabContainer) {
|
|
720
|
+
tabContainer.style.display = 'block';
|
|
721
|
+
}
|
|
727
722
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
723
|
+
if (paneles) {
|
|
724
|
+
paneles.style.display = 'block';
|
|
725
|
+
}
|
|
731
726
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
727
|
+
if (esriWidgetButton) {
|
|
728
|
+
esriWidgetButton.classList.replace(
|
|
729
|
+
'esri-icon-drag-horizontal',
|
|
730
|
+
'esri-icon-close',
|
|
731
|
+
);
|
|
732
|
+
}
|
|
738
733
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
734
|
+
if (timeSliderContainer && document.contains(timeSliderContainer)) {
|
|
735
|
+
timeSliderContainer.style.display = 'block';
|
|
736
|
+
}
|
|
742
737
|
|
|
743
|
-
|
|
738
|
+
this.restorePanelScroll();
|
|
744
739
|
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
740
|
+
// By invoking the setState, we notify the state we want to reach
|
|
741
|
+
// and ensure that the component is rendered again
|
|
742
|
+
this.setState({ showMapMenu: true });
|
|
743
|
+
}
|
|
744
|
+
if (this.loadFirst && this.container.current) {
|
|
745
|
+
this.checkUrl();
|
|
746
|
+
this.loadFirst = false;
|
|
747
|
+
this.zoomTooltips();
|
|
748
|
+
}
|
|
754
749
|
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
750
|
+
let authToken = this.getAuthToken();
|
|
751
|
+
let timeSliderTag = sessionStorage.getItem('timeSliderTag');
|
|
752
|
+
let downloadTag = sessionStorage.getItem('downloadButtonClicked');
|
|
753
|
+
let checkedLayers = JSON.parse(sessionStorage.getItem('checkedLayers'));
|
|
759
754
|
|
|
755
|
+
// "Active on map" section and the time slider opened by default if user is logged in and timeSliderTag is true
|
|
756
|
+
if (checkedLayers && !this.props.download) {
|
|
760
757
|
// "Active on map" section and the time slider opened by default if user is logged in and timeSliderTag is true
|
|
761
|
-
if (
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
el.dispatchEvent(event);
|
|
781
|
-
break;
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
// "Area widget" opened by default if user is logged in and downloadTag is true
|
|
786
|
-
else if (authToken && downloadTag) {
|
|
787
|
-
for (let i = 0; i < checkedLayers.length; i++) {
|
|
788
|
-
let layerid = checkedLayers[i];
|
|
789
|
-
if (
|
|
790
|
-
layerid &&
|
|
791
|
-
!this.layers[layerid].isTimeSeries &&
|
|
792
|
-
!this.container.current
|
|
793
|
-
.querySelector('.esri-widget')
|
|
794
|
-
.classList.contains('esri-icon-drag-horizontal')
|
|
795
|
-
) {
|
|
796
|
-
//open area widget
|
|
797
|
-
let event = new MouseEvent('click', {
|
|
798
|
-
view: window,
|
|
799
|
-
bubbles: true,
|
|
800
|
-
cancelable: false,
|
|
801
|
-
});
|
|
802
|
-
document
|
|
803
|
-
.querySelector('.map-menu-icon-login.logged')
|
|
804
|
-
.dispatchEvent(event);
|
|
805
|
-
break;
|
|
806
|
-
} else if (
|
|
807
|
-
layerid &&
|
|
808
|
-
this.layers[layerid].isTimeSeries &&
|
|
809
|
-
!this.container.current
|
|
810
|
-
.querySelector('.esri-widget')
|
|
811
|
-
.classList.contains('esri-icon-drag-horizontal')
|
|
812
|
-
) {
|
|
813
|
-
// select active on map tab
|
|
814
|
-
let event = new MouseEvent('click', {
|
|
815
|
-
view: window,
|
|
816
|
-
bubbles: true,
|
|
817
|
-
cancelable: false,
|
|
818
|
-
});
|
|
819
|
-
let el = document.getElementById('download_label');
|
|
820
|
-
el.dispatchEvent(event);
|
|
821
|
-
break;
|
|
822
|
-
}
|
|
758
|
+
if (authToken && timeSliderTag) {
|
|
759
|
+
for (let i = 0; i < checkedLayers.length; i++) {
|
|
760
|
+
let layerid = checkedLayers[i];
|
|
761
|
+
if (
|
|
762
|
+
layerid &&
|
|
763
|
+
this.layers[layerid].isTimeSeries &&
|
|
764
|
+
!this.container.current
|
|
765
|
+
.querySelector('.esri-widget')
|
|
766
|
+
.classList.contains('esri-icon-drag-horizontal')
|
|
767
|
+
) {
|
|
768
|
+
// select active on map tab
|
|
769
|
+
let event = new MouseEvent('click', {
|
|
770
|
+
view: window,
|
|
771
|
+
bubbles: true,
|
|
772
|
+
cancelable: false,
|
|
773
|
+
});
|
|
774
|
+
let el = document.getElementById('download_label');
|
|
775
|
+
el.dispatchEvent(event);
|
|
776
|
+
break;
|
|
823
777
|
}
|
|
824
778
|
}
|
|
825
779
|
}
|
|
826
|
-
//
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
if (this.props.download && this.layers) {
|
|
831
|
-
let layerid = Object.keys(this.layers)[0];
|
|
780
|
+
// "Area widget" opened by default if user is logged in and downloadTag is true
|
|
781
|
+
else if (authToken && downloadTag) {
|
|
782
|
+
for (let i = 0; i < checkedLayers.length; i++) {
|
|
783
|
+
let layerid = checkedLayers[i];
|
|
832
784
|
if (
|
|
785
|
+
layerid &&
|
|
786
|
+
!this.layers[layerid].isTimeSeries &&
|
|
787
|
+
!this.container.current
|
|
788
|
+
.querySelector('.esri-widget')
|
|
789
|
+
.classList.contains('esri-icon-drag-horizontal')
|
|
790
|
+
) {
|
|
791
|
+
//open area widget
|
|
792
|
+
let event = new MouseEvent('click', {
|
|
793
|
+
view: window,
|
|
794
|
+
bubbles: true,
|
|
795
|
+
cancelable: false,
|
|
796
|
+
});
|
|
797
|
+
document
|
|
798
|
+
.querySelector('.map-menu-icon-login.logged')
|
|
799
|
+
.dispatchEvent(event);
|
|
800
|
+
break;
|
|
801
|
+
} else if (
|
|
833
802
|
layerid &&
|
|
834
803
|
this.layers[layerid].isTimeSeries &&
|
|
835
804
|
!this.container.current
|
|
@@ -844,9 +813,35 @@ class MenuWidget extends React.Component {
|
|
|
844
813
|
});
|
|
845
814
|
let el = document.getElementById('download_label');
|
|
846
815
|
el.dispatchEvent(event);
|
|
816
|
+
break;
|
|
847
817
|
}
|
|
848
818
|
}
|
|
849
|
-
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
// CLMS-1389
|
|
822
|
+
// "Active on map" section and the time slider opened by default if download and timeseries == true
|
|
823
|
+
|
|
824
|
+
if (this.layers)
|
|
825
|
+
if (this.props.download && this.layers) {
|
|
826
|
+
let layerid = Object.keys(this.layers)[0];
|
|
827
|
+
if (
|
|
828
|
+
layerid &&
|
|
829
|
+
this.layers[layerid].isTimeSeries &&
|
|
830
|
+
!this.container.current
|
|
831
|
+
.querySelector('.esri-widget')
|
|
832
|
+
.classList.contains('esri-icon-drag-horizontal')
|
|
833
|
+
) {
|
|
834
|
+
// select active on map tab
|
|
835
|
+
let event = new MouseEvent('click', {
|
|
836
|
+
view: window,
|
|
837
|
+
bubbles: true,
|
|
838
|
+
cancelable: false,
|
|
839
|
+
});
|
|
840
|
+
let el = document.getElementById('download_label');
|
|
841
|
+
el.dispatchEvent(event);
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
// }, 1000);
|
|
850
845
|
}
|
|
851
846
|
|
|
852
847
|
/**
|
|
@@ -863,25 +858,25 @@ class MenuWidget extends React.Component {
|
|
|
863
858
|
this.props.view.ui.add(this.container.current, 'top-left');
|
|
864
859
|
});
|
|
865
860
|
if (this.props.download) {
|
|
866
|
-
setTimeout(() => {
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
861
|
+
// setTimeout(() => {
|
|
862
|
+
document.querySelector('.area-panel input:checked').click();
|
|
863
|
+
if (document.querySelector('.map-product-checkbox input')) {
|
|
864
|
+
document.querySelector('.map-product-checkbox input').click();
|
|
865
|
+
let dropdown = document.querySelector(
|
|
866
|
+
'.map-menu-dropdown .ccl-expandable__button',
|
|
867
|
+
);
|
|
868
|
+
if (dropdown) {
|
|
869
|
+
dropdown.setAttribute('aria-expanded', 'true');
|
|
870
|
+
dropdown = document.querySelector(
|
|
871
|
+
'.map-menu-product-dropdown .ccl-expandable__button',
|
|
872
872
|
);
|
|
873
|
-
|
|
874
|
-
dropdown.setAttribute('aria-expanded', 'true');
|
|
875
|
-
dropdown = document.querySelector(
|
|
876
|
-
'.map-menu-product-dropdown .ccl-expandable__button',
|
|
877
|
-
);
|
|
878
|
-
dropdown.setAttribute('aria-expanded', 'true');
|
|
879
|
-
}
|
|
873
|
+
dropdown.setAttribute('aria-expanded', 'true');
|
|
880
874
|
}
|
|
881
|
-
}
|
|
875
|
+
}
|
|
876
|
+
// }, 1000);
|
|
882
877
|
}
|
|
883
878
|
//to watch the component
|
|
884
|
-
this.setState({});
|
|
879
|
+
//this.setState({});
|
|
885
880
|
this.openMenu();
|
|
886
881
|
this.expandDropdowns();
|
|
887
882
|
this.loadLayers();
|
|
@@ -2110,9 +2105,9 @@ class MenuWidget extends React.Component {
|
|
|
2110
2105
|
productContainerId !== 'd764e020485a402598551fa461bf1db2' // hotspot
|
|
2111
2106
|
) {
|
|
2112
2107
|
this.extentInitiated = true;
|
|
2113
|
-
setTimeout(() => {
|
|
2114
|
-
|
|
2115
|
-
}, 2000);
|
|
2108
|
+
// setTimeout(() => {
|
|
2109
|
+
this.FullExtentDataset(elem);
|
|
2110
|
+
// }, 2000);
|
|
2116
2111
|
}
|
|
2117
2112
|
}
|
|
2118
2113
|
if (
|
|
@@ -67,12 +67,12 @@ class PrintWidget extends React.Component {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
waitForContainer(mapdiv) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
70
|
+
// waitForContainer(mapdiv) {
|
|
71
|
+
// while (mapdiv === null) {
|
|
72
|
+
// new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms
|
|
73
|
+
// }
|
|
74
|
+
// return mapdiv;
|
|
75
|
+
// }
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* This method is executed after the rener method is executed
|
|
@@ -26,12 +26,12 @@ class ScaleWidget extends React.Component {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
waitForContainer(mapdiv) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
29
|
+
// waitForContainer(mapdiv) {
|
|
30
|
+
// while (mapdiv === null) {
|
|
31
|
+
// new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms
|
|
32
|
+
// }
|
|
33
|
+
// return mapdiv;
|
|
34
|
+
// }
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* This method is executed after the rener method is executed
|
|
@@ -369,20 +369,26 @@ class SwipeWidget extends React.Component {
|
|
|
369
369
|
<div className="right-panel-content">
|
|
370
370
|
<div className="swipe-panel">
|
|
371
371
|
<span>Leading Layer</span>
|
|
372
|
-
<select
|
|
372
|
+
<select
|
|
373
|
+
id="select-leading-layer"
|
|
374
|
+
className="esri-select"
|
|
375
|
+
></select>
|
|
373
376
|
<br></br>
|
|
374
377
|
<span>Trailing Layer</span>
|
|
375
|
-
<select
|
|
378
|
+
<select
|
|
379
|
+
id="select-trailing-layer"
|
|
380
|
+
className="esri-select"
|
|
381
|
+
></select>
|
|
376
382
|
<br></br>
|
|
377
383
|
<span>Swipe Direction</span>
|
|
378
|
-
<select id="select-swipe-direction"
|
|
384
|
+
<select id="select-swipe-direction" className="esri-select">
|
|
379
385
|
<option value="horizontal">Horizontal</option>
|
|
380
386
|
<option value="vertical">Vertical</option>
|
|
381
387
|
</select>
|
|
382
388
|
<br></br>
|
|
383
389
|
<button
|
|
384
390
|
id="applySwipeButton"
|
|
385
|
-
|
|
391
|
+
className="esri-button"
|
|
386
392
|
onClick={() => this.renderApplySwipeButton()}
|
|
387
393
|
>
|
|
388
394
|
Swipe
|