• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

geosolutions-it / MapStore2 / 19710972030

26 Nov 2025 03:38PM UTC coverage: 76.665% (-0.3%) from 76.929%
19710972030

Pull #11119

github

web-flow
Fix maven publish (#11739)
Pull Request #11119: Layer Selection Plugin on ArcGIS, WFS & WMS layers

32272 of 50209 branches covered (64.28%)

3 of 3 new or added lines in 2 files covered. (100.0%)

3018 existing lines in 249 files now uncovered.

40157 of 52380 relevant lines covered (76.66%)

37.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.67
/web/client/actions/swipe.js
1
/**
2
 * Copyright 2020, GeoSolutions Sas.
3
 * All rights reserved.
4
 *
5
 * This source code is licensed under the BSD-style license found in the
6
 * LICENSE file in the root directory of this source tree.
7
 */
8

9
const SET_ACTIVE = "SWIPE:SET_ACTIVE";
1✔
10
const SET_MODE = "SWIPE:SET_MODE";
1✔
11
const SET_SWIPE_TOOL_DIRECTION = "SWIPE:SET_SWIPE_TOOL_DIRECTION";
1✔
12
const SET_SPY_TOOL_RADIUS = "SWIPE:SET_SPY_TOOL_RADIUS";
1✔
13
const SET_SWIPE_LAYER = "SWIPE:SET_SWIPE_LAYER";
1✔
14
const SET_SWIPE_SLIDER_OPTIONS = "SWIPE:SET_SWIPE_SLIDER_OPTIONS";
1✔
15

16
/**
17
* Sets the status of boolean values of the swipe redux state
18
* @memberof actions.swipe
19
* @param {boolean} active
20
* @param {string}  prop the name of the property to set to either true or false
21
* @param {string}  layerId id of selected layer
22
* @return {object} of type `SET_ACTIVE` with active and prop
23
*/
24
function setActive(active, prop = "active", layerId) {
4✔
25
    return {
4✔
26
        type: SET_ACTIVE,
27
        active,
28
        prop,
29
        layerId
30
    };
31
}
32

33
/**
34
* Sets the mode of the Swipe tool i.e. either swipe or spy
35
* @memberof actions.swipe
36
* @param {string} mode
37
* @return {object} of type `SET_MODE` with mode
38
*/
39
function setMode(mode = "swipe") {
1✔
40
    return {
2✔
41
        type: SET_MODE,
42
        mode
43
    };
44
}
45

46
/**
47
* Sets the cut direction of the swipe tool
48
* @memberof actions.swipe
49
* @param {string} direction cut-vertical or cut-horizontal
50
* @return {object} of type `SET_SWIPE_TOOL_DIRECTION` with direction
51
*/
52
function setSwipeToolDirection(direction) {
53
    return {
1✔
54
        type: SET_SWIPE_TOOL_DIRECTION,
55
        direction
56
    };
57
}
58

59
/**
60
* Sets the radius of the spyglass mode
61
* @memberof actions.swipe
62
* @param {number} radius
63
* @return {object} of type `SET_SPY_TOOL_RADIUS` with radius
64
*/
65
function setSpyToolRadius(radius) {
66
    return {
1✔
67
        type: SET_SPY_TOOL_RADIUS,
68
        radius
69
    };
70
}
71

72
/**
73
* Sets the selected layer id
74
* @memberof actions.swipe
75
* @param {string}  layerId id of selected layer
76
* @return {object} of type `SET_SWIPE_LAYER` with layerId
77
*/
78
function setSwipeLayer( layerId) {
UNCOV
79
    return {
×
80
        type: SET_SWIPE_LAYER,
81
        layerId
82
    };
83
}
84
/**
85
* Sets the swipe slider options
86
* @memberof actions.swipe
87
* @param {object}  options swipe slider options
88
* @return {object} of type `SET_SWIPE_SLIDER_OPTIONS` with slider options
89
*/
90
function setSwipeSliderOps(options) {
91
    return {
2✔
92
        type: SET_SWIPE_SLIDER_OPTIONS,
93
        options
94
    };
95
}
96

97
export {
98
    setActive,
99
    setMode,
100
    setSwipeToolDirection,
101
    setSpyToolRadius,
102
    setSwipeLayer,
103
    setSwipeSliderOps,
104
    SET_ACTIVE,
105
    SET_MODE,
106
    SET_SWIPE_TOOL_DIRECTION,
107
    SET_SPY_TOOL_RADIUS,
108
    SET_SWIPE_LAYER,
109
    SET_SWIPE_SLIDER_OPTIONS
110
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc