@mapcomponents/react-maplibre 0.1.9 → 0.1.13
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/.github/ISSUE_TEMPLATE/bug_report.md +2 -2
- package/.github/ISSUE_TEMPLATE/feature_request.md +3 -3
- package/.github/workflows/node_version_test.yml +25 -0
- package/.github/workflows/storybook.yml +6 -3
- package/CONTRIBUTING.md +2 -2
- package/README.md +3 -7
- package/coverage/clover.xml +748 -625
- package/coverage/coverage-final.json +19 -14
- package/coverage/lcov-report/block-navigation.js +8 -0
- package/coverage/lcov-report/index.html +170 -104
- package/coverage/lcov-report/sorter.js +26 -0
- package/coverage/lcov-report/{components → src/components}/MapLibreMap/MapLibreMap.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MapLibreMap/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlCreatePdfButton/MlCreatePdfButton.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlCreatePdfButton/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFeatureEditor/MlFeatureEditor.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFeatureEditor/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFillExtrusionLayer/MlFillExtrusionLayer.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFillExtrusionLayer/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFollowGps/MlFollowGps.js.html +99 -48
- package/coverage/lcov-report/{components → src/components}/MlFollowGps/index.html +27 -21
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/MlGPXViewer.js.html +73 -61
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/gpxConverter.js.html +56 -71
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/index.html +32 -26
- package/coverage/lcov-report/{components → src/components}/MlGeoJsonLayer/MlGeoJsonLayer.js.html +91 -31
- package/coverage/lcov-report/{components → src/components}/MlGeoJsonLayer/index.html +35 -29
- package/coverage/lcov-report/{components → src/components}/MlImageMarkerLayer/MlImageMarkerLayer.js.html +26 -23
- package/coverage/lcov-report/{components → src/components}/MlImageMarkerLayer/index.html +26 -20
- package/coverage/lcov-report/{components → src/components}/MlLayer/MlLayer.js.html +37 -31
- package/coverage/lcov-report/{components → src/components}/MlLayer/index.html +33 -27
- package/coverage/lcov-report/{components → src/components}/MlLayerMagnify/MlLayerMagnify.js.html +48 -42
- package/coverage/lcov-report/{components → src/components}/MlLayerMagnify/index.html +31 -25
- package/coverage/lcov-report/{components → src/components}/MlLayerSwipe/MlLayerSwipe.js.html +45 -42
- package/coverage/lcov-report/{components → src/components}/MlLayerSwipe/index.html +31 -25
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +755 -0
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +380 -0
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +117 -0
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +117 -0
- package/coverage/lcov-report/{components → src/components}/MlMarker/MlMarker.js.html +18 -12
- package/coverage/lcov-report/{components → src/components}/MlMarker/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlNavigationCompass/MlNavigationCompass.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlNavigationCompass/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlNavigationTools/MlNavigationTools.js.html +55 -37
- package/coverage/lcov-report/{components → src/components}/MlNavigationTools/index.html +23 -17
- package/coverage/lcov-report/{components → src/components}/MlOsmLayer/MlOsmLayer.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlOsmLayer/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlScaleReference/MlScaleReference.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlScaleReference/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlShareMapState/MlShareMapState.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlShareMapState/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlSpatialElevationProfile/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlThreeJsLayer/MlThreeJsLayer.js.html +37 -55
- package/coverage/lcov-report/{components → src/components}/MlThreeJsLayer/index.html +31 -25
- package/coverage/lcov-report/{components → src/components}/MlUseMapDebugger/MlUseMapDebugger.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlUseMapDebugger/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlVectorTileLayer/MlVectorTileLayer.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlVectorTileLayer/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlWmsFeatureInfoPopup/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlWmsLayer/MlWmsLayer.js.html +20 -14
- package/coverage/lcov-report/{components → src/components}/MlWmsLayer/index.html +21 -15
- package/coverage/lcov-report/{components → src/components}/MlWmsLoader/MlWmsLoader.js.html +38 -20
- package/coverage/lcov-report/{components → src/components}/MlWmsLoader/index.html +23 -17
- package/coverage/lcov-report/{hooks → src/hooks}/index.html +17 -11
- package/coverage/lcov-report/{hooks → src/hooks}/useMap.js.html +17 -11
- package/coverage/lcov-report/{hooks → src/hooks}/useMapState.js.html +17 -11
- package/coverage/lcov-report/{hooks → src/hooks}/useWms.js.html +25 -19
- package/coverage/lcov-report/src/i18n.js.html +167 -0
- package/coverage/lcov-report/src/index.html +117 -0
- package/coverage/lcov-report/src/translations/english.js.html +95 -0
- package/coverage/lcov-report/src/translations/german.js.html +95 -0
- package/coverage/lcov-report/src/translations/index.html +132 -0
- package/coverage/lcov.info +1278 -1010
- package/dist/b556faa3bc6829d2.png +0 -0
- package/dist/index.esm.js +170 -109
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -1
- package/public/assets/dop.png +0 -0
- package/public/assets/historic.png +0 -0
- package/public/assets/osm.png +0 -0
- package/public/thumbnails/MlFollowGps.png +0 -0
- package/public/thumbnails/MlThreeJsLayer.png +0 -0
- package/rollup.config.js +10 -2
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.js +58 -73
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.meta.json +1 -1
- package/src/components/MlFeatureEditor/MlFeatureEditor.meta.json +2 -2
- package/src/components/MlFollowGps/MlFollowGps.js +46 -31
- package/src/components/MlFollowGps/MlFollowGps.meta.json +2 -2
- package/src/components/MlFollowGps/assets/marker.png +0 -0
- package/src/components/MlGPXViewer/MlGPXViewer.js +45 -43
- package/src/components/MlGPXViewer/gpxConverter.js +22 -29
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.js +27 -9
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.meta.json +1 -1
- package/src/components/MlGeoJsonLayer/util/transitionFunctions.js +19 -12
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.js +3 -4
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.test.js +6 -7
- package/src/components/MlLayer/MlLayer.js +2 -2
- package/src/components/MlLayer/MlLayer.test.js +12 -10
- package/src/components/MlLayerMagnify/MlLayerMagnify.js +3 -3
- package/src/components/MlLayerSwipe/MlLayerSwipe.js +4 -5
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.css +17 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.doc.de.md +3 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.js +223 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.meta_.json +15 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.stories.js +106 -0
- package/src/components/MlLayerSwitcher/assets/sample_1.json +26 -0
- package/src/components/MlLayerSwitcher/assets/sample_2.json +22 -0
- package/src/components/MlLayerSwitcher/components/LayerBox.js +98 -0
- package/src/components/MlMarker/MlMarker.js +1 -1
- package/src/components/MlNavigationTools/MlNavigationTools.js +26 -22
- package/src/components/MlScaleReference/MlScaleReference.meta.json +1 -1
- package/src/components/MlScaleReference/MlScaleReference.stories.js +25 -21
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.js +12 -6
- package/src/components/MlThreeJsLayer/MlThreeJsLayer.js +8 -15
- package/src/components/MlVectorTileLayer/MlVectorTileLayer.meta.json +3 -3
- package/src/components/MlWmsLayer/MlWmsLayer.js +1 -1
- package/src/components/MlWmsLoader/MlWmsLoader.js +8 -4
- package/src/components/MlWmsLoader/MlWmsLoader.meta.json +1 -1
- package/src/components/MlWmsLoader/MlWmsLoader.stories.js +5 -4
- package/src/decorators/EmptyMapContextDecorator.js +11 -6
- package/src/decorators/MapContext3DDecorator.js +25 -20
- package/src/decorators/MapContextDashboardDecorator.js +7 -7
- package/src/decorators/MapContextDecorator.js +7 -8
- package/src/decorators/MapContextKlokantechBasicDecorator.js +8 -9
- package/src/decorators/MultiMapContextDecorator.js +2 -6
- package/src/hooks/useMapState.stories.js +7 -2
- package/src/hooks/useWms.js +7 -6
- package/src/i18n.js +28 -0
- package/src/translations/english.js +4 -0
- package/src/translations/german.js +4 -0
- package/src/ui_components/ImageLoader.js +73 -0
- package/src/ui_components/Sidebar.js +76 -22
- package/src/ui_components/TopToolbar.js +18 -18
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlImageMarkerLayer</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlImageMarkerLayer</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
12
|
<style type='text/css'>
|
|
13
13
|
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> src/components/MlImageMarkerLayer</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">79.
|
|
26
|
+
<span class="strong">79.54% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>35/44</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">81.39% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>35/43</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -54,6 +54,12 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
57
63
|
</div>
|
|
58
64
|
<div class='status-line medium'></div>
|
|
59
65
|
<div class="pad1">
|
|
@@ -74,17 +80,17 @@
|
|
|
74
80
|
</thead>
|
|
75
81
|
<tbody><tr>
|
|
76
82
|
<td class="file medium" data-value="MlImageMarkerLayer.js"><a href="MlImageMarkerLayer.js.html">MlImageMarkerLayer.js</a></td>
|
|
77
|
-
<td data-value="79.
|
|
83
|
+
<td data-value="79.54" class="pic medium">
|
|
78
84
|
<div class="chart"><div class="cover-fill" style="width: 79%"></div><div class="cover-empty" style="width: 21%"></div></div>
|
|
79
85
|
</td>
|
|
80
|
-
<td data-value="79.
|
|
81
|
-
<td data-value="
|
|
86
|
+
<td data-value="79.54" class="pct medium">79.54%</td>
|
|
87
|
+
<td data-value="44" class="abs medium">35/44</td>
|
|
82
88
|
<td data-value="62.85" class="pct medium">62.85%</td>
|
|
83
89
|
<td data-value="35" class="abs medium">22/35</td>
|
|
84
90
|
<td data-value="87.5" class="pct high">87.5%</td>
|
|
85
91
|
<td data-value="8" class="abs high">7/8</td>
|
|
86
|
-
<td data-value="
|
|
87
|
-
<td data-value="
|
|
92
|
+
<td data-value="81.39" class="pct high">81.39%</td>
|
|
93
|
+
<td data-value="43" class="abs high">35/43</td>
|
|
88
94
|
</tr>
|
|
89
95
|
|
|
90
96
|
</tbody>
|
|
@@ -94,18 +100,18 @@
|
|
|
94
100
|
</div><!-- /wrapper -->
|
|
95
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
96
102
|
Code coverage generated by
|
|
97
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
98
|
-
at
|
|
103
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
104
|
+
at Wed Dec 15 2021 17:14:00 GMT+0000 (Coordinated Universal Time)
|
|
99
105
|
</div>
|
|
100
106
|
</div>
|
|
101
|
-
<script src="
|
|
107
|
+
<script src="../../../prettify.js"></script>
|
|
102
108
|
<script>
|
|
103
109
|
window.onload = function () {
|
|
104
110
|
prettyPrint();
|
|
105
111
|
};
|
|
106
112
|
</script>
|
|
107
|
-
<script src="
|
|
108
|
-
<script src="
|
|
113
|
+
<script src="../../../sorter.js"></script>
|
|
114
|
+
<script src="../../../block-navigation.js"></script>
|
|
109
115
|
</body>
|
|
110
116
|
</html>
|
|
111
117
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlLayer/MlLayer.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlLayer/MlLayer.js</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
12
|
<style type='text/css'>
|
|
13
13
|
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> / <a href="index.html">src/components/MlLayer</a> MlLayer.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">75.67% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>28/37</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">50% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>14/28</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">75% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>27/36</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -54,8 +54,14 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
57
63
|
</div>
|
|
58
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line medium'></div>
|
|
59
65
|
<pre><table class="coverage">
|
|
60
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
61
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -179,21 +185,21 @@
|
|
|
179
185
|
<span class="cline-any cline-neutral"> </span>
|
|
180
186
|
<span class="cline-any cline-neutral"> </span>
|
|
181
187
|
<span class="cline-any cline-neutral"> </span>
|
|
182
|
-
<span class="cline-any cline-yes">
|
|
188
|
+
<span class="cline-any cline-yes">12x</span>
|
|
183
189
|
<span class="cline-any cline-neutral"> </span>
|
|
184
190
|
<span class="cline-any cline-neutral"> </span>
|
|
185
191
|
<span class="cline-any cline-neutral"> </span>
|
|
186
192
|
<span class="cline-any cline-neutral"> </span>
|
|
187
|
-
<span class="cline-any cline-
|
|
188
|
-
<span class="cline-any cline-
|
|
193
|
+
<span class="cline-any cline-no"> </span>
|
|
194
|
+
<span class="cline-any cline-no"> </span>
|
|
189
195
|
<span class="cline-any cline-no"> </span>
|
|
190
196
|
<span class="cline-any cline-no"> </span>
|
|
191
197
|
<span class="cline-any cline-neutral"> </span>
|
|
192
198
|
<span class="cline-any cline-no"> </span>
|
|
193
199
|
<span class="cline-any cline-neutral"> </span>
|
|
194
200
|
<span class="cline-any cline-neutral"> </span>
|
|
195
|
-
<span class="cline-any cline-
|
|
196
|
-
<span class="cline-any cline-
|
|
201
|
+
<span class="cline-any cline-no"> </span>
|
|
202
|
+
<span class="cline-any cline-no"> </span>
|
|
197
203
|
<span class="cline-any cline-no"> </span>
|
|
198
204
|
<span class="cline-any cline-no"> </span>
|
|
199
205
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -243,7 +249,7 @@ const MlLayer = (props) => {
|
|
|
243
249
|
(props.layerId ? <span class="branch-0 cbranch-no" title="branch not covered" >props.layerId </span>: "MlLayer-") + uuidv4()
|
|
244
250
|
);
|
|
245
251
|
const idSuffixRef = useRef(props.idSuffix || new Date().getTime());
|
|
246
|
-
const layerId = (props.layerId ||
|
|
252
|
+
const layerId = useRef(props.layerId || componentId.current);
|
|
247
253
|
const layerPaintConfRef = useRef(undefined);
|
|
248
254
|
const layerLayoutConfRef = useRef(undefined);
|
|
249
255
|
|
|
@@ -262,24 +268,24 @@ const MlLayer = (props) => {
|
|
|
262
268
|
if (
|
|
263
269
|
!mapContext.mapExists(props.mapId) ||
|
|
264
270
|
!mapContext.getMap(props.mapId)?.getLayer?.(layerId) ||
|
|
265
|
-
!layerInitializedRef.current
|
|
266
|
-
!props.options
|
|
271
|
+
<span class="branch-2 cbranch-no" title="branch not covered" > !layerInitializedRef.current </span>||
|
|
272
|
+
<span class="branch-3 cbranch-no" title="branch not covered" > !props.options</span>
|
|
267
273
|
)
|
|
268
274
|
return;
|
|
269
275
|
// the MapLibre-gl instance (mapContext.map) is accessible here
|
|
270
276
|
// initialize the layer and add it to the MapLibre-gl instance or do something else with it
|
|
271
277
|
var key;
|
|
272
278
|
|
|
273
|
-
let layoutString = JSON.stringify(props.options.layout)
|
|
274
|
-
|
|
279
|
+
let layoutString = <span class="cstat-no" title="statement not covered" >JSON.stringify(props.options.layout);</span>
|
|
280
|
+
<span class="cstat-no" title="statement not covered" > if (props.options.layout && layoutString !== layerLayoutConfRef.current) {</span>
|
|
275
281
|
<span class="cstat-no" title="statement not covered" > for (key in props.options.layout) {</span>
|
|
276
282
|
<span class="cstat-no" title="statement not covered" > mapRef.current.setLayoutProperty(layerId, key, props.options.layout[key]);</span>
|
|
277
283
|
}
|
|
278
284
|
<span class="cstat-no" title="statement not covered" > layerLayoutConfRef.current = layoutString;</span>
|
|
279
285
|
}
|
|
280
286
|
|
|
281
|
-
let paintString = JSON.stringify(props.options.paint)
|
|
282
|
-
|
|
287
|
+
let paintString = <span class="cstat-no" title="statement not covered" >JSON.stringify(props.options.paint);</span>
|
|
288
|
+
<span class="cstat-no" title="statement not covered" > if (props.options.paint && paintString === layerPaintConfRef.current) {</span>
|
|
283
289
|
<span class="cstat-no" title="statement not covered" > for (key in props.options.paint) {</span>
|
|
284
290
|
<span class="cstat-no" title="statement not covered" > mapRef.current.setPaintProperty(layerId, key, props.options.paint[key]);</span>
|
|
285
291
|
}
|
|
@@ -296,7 +302,7 @@ const MlLayer = (props) => {
|
|
|
296
302
|
layerInitializedRef.current = true;
|
|
297
303
|
mapRef.current.addLayer(
|
|
298
304
|
{
|
|
299
|
-
id: layerId,
|
|
305
|
+
id: layerId.current,
|
|
300
306
|
type: "background",
|
|
301
307
|
paint: {
|
|
302
308
|
"background-color": "rgba(0,0,0,0)",
|
|
@@ -321,18 +327,18 @@ export default MlLayer;
|
|
|
321
327
|
</div><!-- /wrapper -->
|
|
322
328
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
323
329
|
Code coverage generated by
|
|
324
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
325
|
-
at
|
|
330
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
331
|
+
at Wed Dec 15 2021 17:14:00 GMT+0000 (Coordinated Universal Time)
|
|
326
332
|
</div>
|
|
327
333
|
</div>
|
|
328
|
-
<script src="
|
|
334
|
+
<script src="../../../prettify.js"></script>
|
|
329
335
|
<script>
|
|
330
336
|
window.onload = function () {
|
|
331
337
|
prettyPrint();
|
|
332
338
|
};
|
|
333
339
|
</script>
|
|
334
|
-
<script src="
|
|
335
|
-
<script src="
|
|
340
|
+
<script src="../../../sorter.js"></script>
|
|
341
|
+
<script src="../../../block-navigation.js"></script>
|
|
336
342
|
</body>
|
|
337
343
|
</html>
|
|
338
344
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlLayer</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlLayer</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
12
|
<style type='text/css'>
|
|
13
13
|
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> src/components/MlLayer</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">75.67% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>28/37</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">50% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>14/28</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">75% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>27/36</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -54,8 +54,14 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
57
63
|
</div>
|
|
58
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line medium'></div>
|
|
59
65
|
<div class="pad1">
|
|
60
66
|
<table class="coverage-summary">
|
|
61
67
|
<thead>
|
|
@@ -73,18 +79,18 @@
|
|
|
73
79
|
</tr>
|
|
74
80
|
</thead>
|
|
75
81
|
<tbody><tr>
|
|
76
|
-
<td class="file
|
|
77
|
-
<td data-value="
|
|
78
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
82
|
+
<td class="file medium" data-value="MlLayer.js"><a href="MlLayer.js.html">MlLayer.js</a></td>
|
|
83
|
+
<td data-value="75.67" class="pic medium">
|
|
84
|
+
<div class="chart"><div class="cover-fill" style="width: 75%"></div><div class="cover-empty" style="width: 25%"></div></div>
|
|
79
85
|
</td>
|
|
80
|
-
<td data-value="
|
|
81
|
-
<td data-value="37" class="abs
|
|
82
|
-
<td data-value="
|
|
83
|
-
<td data-value="28" class="abs medium">
|
|
86
|
+
<td data-value="75.67" class="pct medium">75.67%</td>
|
|
87
|
+
<td data-value="37" class="abs medium">28/37</td>
|
|
88
|
+
<td data-value="50" class="pct medium">50%</td>
|
|
89
|
+
<td data-value="28" class="abs medium">14/28</td>
|
|
84
90
|
<td data-value="100" class="pct high">100%</td>
|
|
85
91
|
<td data-value="5" class="abs high">5/5</td>
|
|
86
|
-
<td data-value="
|
|
87
|
-
<td data-value="36" class="abs
|
|
92
|
+
<td data-value="75" class="pct medium">75%</td>
|
|
93
|
+
<td data-value="36" class="abs medium">27/36</td>
|
|
88
94
|
</tr>
|
|
89
95
|
|
|
90
96
|
</tbody>
|
|
@@ -94,18 +100,18 @@
|
|
|
94
100
|
</div><!-- /wrapper -->
|
|
95
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
96
102
|
Code coverage generated by
|
|
97
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
98
|
-
at
|
|
103
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
104
|
+
at Wed Dec 15 2021 17:14:00 GMT+0000 (Coordinated Universal Time)
|
|
99
105
|
</div>
|
|
100
106
|
</div>
|
|
101
|
-
<script src="
|
|
107
|
+
<script src="../../../prettify.js"></script>
|
|
102
108
|
<script>
|
|
103
109
|
window.onload = function () {
|
|
104
110
|
prettyPrint();
|
|
105
111
|
};
|
|
106
112
|
</script>
|
|
107
|
-
<script src="
|
|
108
|
-
<script src="
|
|
113
|
+
<script src="../../../sorter.js"></script>
|
|
114
|
+
<script src="../../../block-navigation.js"></script>
|
|
109
115
|
</body>
|
|
110
116
|
</html>
|
|
111
117
|
|
package/coverage/lcov-report/{components → src/components}/MlLayerMagnify/MlLayerMagnify.js.html
RENAMED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlLayerMagnify/MlLayerMagnify.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlLayerMagnify/MlLayerMagnify.js</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
12
|
<style type='text/css'>
|
|
13
13
|
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> / <a href="index.html">src/components/MlLayerMagnify</a> MlLayerMagnify.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">72.6% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>53/73</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">61.36% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>27/44</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">74.28% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>52/70</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -54,6 +54,12 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
57
63
|
</div>
|
|
58
64
|
<div class='status-line medium'></div>
|
|
59
65
|
<pre><table class="coverage">
|
|
@@ -278,31 +284,31 @@
|
|
|
278
284
|
<span class="cline-any cline-neutral"> </span>
|
|
279
285
|
<span class="cline-any cline-neutral"> </span>
|
|
280
286
|
<span class="cline-any cline-yes">1x</span>
|
|
281
|
-
<span class="cline-any cline-yes">
|
|
282
|
-
<span class="cline-any cline-yes">
|
|
283
|
-
<span class="cline-any cline-yes">
|
|
284
|
-
<span class="cline-any cline-neutral"> </span>
|
|
285
|
-
<span class="cline-any cline-yes">2x</span>
|
|
286
|
-
<span class="cline-any cline-yes">2x</span>
|
|
287
|
-
<span class="cline-any cline-yes">2x</span>
|
|
288
|
-
<span class="cline-any cline-yes">2x</span>
|
|
287
|
+
<span class="cline-any cline-yes">3x</span>
|
|
288
|
+
<span class="cline-any cline-yes">3x</span>
|
|
289
|
+
<span class="cline-any cline-yes">3x</span>
|
|
289
290
|
<span class="cline-any cline-neutral"> </span>
|
|
290
|
-
<span class="cline-any cline-yes">
|
|
291
|
+
<span class="cline-any cline-yes">3x</span>
|
|
292
|
+
<span class="cline-any cline-yes">3x</span>
|
|
293
|
+
<span class="cline-any cline-yes">3x</span>
|
|
294
|
+
<span class="cline-any cline-yes">3x</span>
|
|
291
295
|
<span class="cline-any cline-neutral"> </span>
|
|
292
|
-
<span class="cline-any cline-yes">
|
|
296
|
+
<span class="cline-any cline-yes">3x</span>
|
|
293
297
|
<span class="cline-any cline-neutral"> </span>
|
|
294
|
-
<span class="cline-any cline-yes">2x</span>
|
|
295
298
|
<span class="cline-any cline-yes">3x</span>
|
|
296
|
-
<span class="cline-any cline-no"> </span>
|
|
297
299
|
<span class="cline-any cline-neutral"> </span>
|
|
298
300
|
<span class="cline-any cline-yes">3x</span>
|
|
301
|
+
<span class="cline-any cline-yes">3x</span>
|
|
299
302
|
<span class="cline-any cline-no"> </span>
|
|
300
303
|
<span class="cline-any cline-neutral"> </span>
|
|
301
|
-
<span class="cline-any cline-neutral"> </span>
|
|
302
304
|
<span class="cline-any cline-yes">3x</span>
|
|
305
|
+
<span class="cline-any cline-yes">1x</span>
|
|
303
306
|
<span class="cline-any cline-neutral"> </span>
|
|
304
307
|
<span class="cline-any cline-neutral"> </span>
|
|
305
308
|
<span class="cline-any cline-yes">2x</span>
|
|
309
|
+
<span class="cline-any cline-neutral"> </span>
|
|
310
|
+
<span class="cline-any cline-neutral"> </span>
|
|
311
|
+
<span class="cline-any cline-yes">3x</span>
|
|
306
312
|
<span class="cline-any cline-no"> </span>
|
|
307
313
|
<span class="cline-any cline-neutral"> </span>
|
|
308
314
|
<span class="cline-any cline-no"> </span>
|
|
@@ -311,7 +317,7 @@
|
|
|
311
317
|
<span class="cline-any cline-neutral"> </span>
|
|
312
318
|
<span class="cline-any cline-neutral"> </span>
|
|
313
319
|
<span class="cline-any cline-neutral"> </span>
|
|
314
|
-
<span class="cline-any cline-yes">
|
|
320
|
+
<span class="cline-any cline-yes">3x</span>
|
|
315
321
|
<span class="cline-any cline-yes">1x</span>
|
|
316
322
|
<span class="cline-any cline-yes">1x</span>
|
|
317
323
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -323,7 +329,7 @@
|
|
|
323
329
|
<span class="cline-any cline-neutral"> </span>
|
|
324
330
|
<span class="cline-any cline-neutral"> </span>
|
|
325
331
|
<span class="cline-any cline-neutral"> </span>
|
|
326
|
-
<span class="cline-any cline-yes">
|
|
332
|
+
<span class="cline-any cline-yes">3x</span>
|
|
327
333
|
<span class="cline-any cline-neutral"> </span>
|
|
328
334
|
<span class="cline-any cline-yes">1x</span>
|
|
329
335
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -361,7 +367,7 @@
|
|
|
361
367
|
<span class="cline-any cline-neutral"> </span>
|
|
362
368
|
<span class="cline-any cline-neutral"> </span>
|
|
363
369
|
<span class="cline-any cline-neutral"> </span>
|
|
364
|
-
<span class="cline-any cline-yes">
|
|
370
|
+
<span class="cline-any cline-yes">3x</span>
|
|
365
371
|
<span class="cline-any cline-yes">2x</span>
|
|
366
372
|
<span class="cline-any cline-neutral"> </span>
|
|
367
373
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -398,7 +404,7 @@
|
|
|
398
404
|
<span class="cline-any cline-neutral"> </span>
|
|
399
405
|
<span class="cline-any cline-neutral"> </span>
|
|
400
406
|
<span class="cline-any cline-neutral"> </span>
|
|
401
|
-
<span class="cline-any cline-yes">
|
|
407
|
+
<span class="cline-any cline-yes">3x</span>
|
|
402
408
|
<span class="cline-any cline-no"> </span>
|
|
403
409
|
<span class="cline-any cline-no"> </span>
|
|
404
410
|
<span class="cline-any cline-no"> </span>
|
|
@@ -408,22 +414,22 @@
|
|
|
408
414
|
<span class="cline-any cline-neutral"> </span>
|
|
409
415
|
<span class="cline-any cline-neutral"> </span>
|
|
410
416
|
<span class="cline-any cline-neutral"> </span>
|
|
411
|
-
<span class="cline-any cline-yes">
|
|
417
|
+
<span class="cline-any cline-yes">3x</span>
|
|
412
418
|
<span class="cline-any cline-no"> </span>
|
|
413
419
|
<span class="cline-any cline-no"> </span>
|
|
414
420
|
<span class="cline-any cline-neutral"> </span>
|
|
415
421
|
<span class="cline-any cline-neutral"> </span>
|
|
416
|
-
<span class="cline-any cline-yes">
|
|
422
|
+
<span class="cline-any cline-yes">3x</span>
|
|
417
423
|
<span class="cline-any cline-no"> </span>
|
|
418
424
|
<span class="cline-any cline-no"> </span>
|
|
419
425
|
<span class="cline-any cline-neutral"> </span>
|
|
420
426
|
<span class="cline-any cline-neutral"> </span>
|
|
421
|
-
<span class="cline-any cline-yes">
|
|
427
|
+
<span class="cline-any cline-yes">3x</span>
|
|
422
428
|
<span class="cline-any cline-no"> </span>
|
|
423
429
|
<span class="cline-any cline-no"> </span>
|
|
424
430
|
<span class="cline-any cline-neutral"> </span>
|
|
425
431
|
<span class="cline-any cline-neutral"> </span>
|
|
426
|
-
<span class="cline-any cline-yes">
|
|
432
|
+
<span class="cline-any cline-yes">3x</span>
|
|
427
433
|
<span class="cline-any cline-neutral"> </span>
|
|
428
434
|
<span class="cline-any cline-neutral"> </span>
|
|
429
435
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -502,8 +508,8 @@ const MlLayerMagnify = (props) => {
|
|
|
502
508
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (!props.map1Id || !props.map2Id) {
|
|
503
509
|
<span class="cstat-no" title="statement not covered" > return false;</span>
|
|
504
510
|
}
|
|
505
|
-
|
|
506
|
-
|
|
511
|
+
if (!mapContext.getMap(props.map1Id) || !mapContext.getMap(props.map2Id)) {
|
|
512
|
+
return false;
|
|
507
513
|
}
|
|
508
514
|
|
|
509
515
|
return true;
|
|
@@ -573,8 +579,8 @@ const MlLayerMagnify = (props) => {
|
|
|
573
579
|
|
|
574
580
|
syncMoveInitializedRef.current = true;
|
|
575
581
|
syncCleanupFunctionRef.current = syncMove(
|
|
576
|
-
mapContext.getMap(props.map1Id),
|
|
577
|
-
mapContext.getMap(props.map2Id)
|
|
582
|
+
mapContext.getMap(props.map1Id).map,
|
|
583
|
+
mapContext.getMap(props.map2Id).map
|
|
578
584
|
);
|
|
579
585
|
|
|
580
586
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (
|
|
@@ -684,18 +690,18 @@ export default MlLayerMagnify;
|
|
|
684
690
|
</div><!-- /wrapper -->
|
|
685
691
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
686
692
|
Code coverage generated by
|
|
687
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
688
|
-
at
|
|
693
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
694
|
+
at Wed Dec 15 2021 17:14:00 GMT+0000 (Coordinated Universal Time)
|
|
689
695
|
</div>
|
|
690
696
|
</div>
|
|
691
|
-
<script src="
|
|
697
|
+
<script src="../../../prettify.js"></script>
|
|
692
698
|
<script>
|
|
693
699
|
window.onload = function () {
|
|
694
700
|
prettyPrint();
|
|
695
701
|
};
|
|
696
702
|
</script>
|
|
697
|
-
<script src="
|
|
698
|
-
<script src="
|
|
703
|
+
<script src="../../../sorter.js"></script>
|
|
704
|
+
<script src="../../../block-navigation.js"></script>
|
|
699
705
|
</body>
|
|
700
706
|
</html>
|
|
701
707
|
|