@@ -24,7 +24,7 @@ module.exports = {
24
24
// fields: fields to search on
25
25
const fields = options ?. fields || [ 'name' , 'description' ]
26
26
return {
27
- component : 'collection/KFilter' ,
27
+ component : 'collection/KFilter' ,
28
28
label : options ?. label ,
29
29
fields
30
30
}
@@ -33,15 +33,15 @@ module.exports = {
33
33
// renderer: renderer to be used to display the action
34
34
const renderer = options ?. renderer || 'button'
35
35
return {
36
- id : 'locate-user' ,
36
+ id : 'locate-user' ,
37
37
label : renderer === 'item' ? 'layout.SHOW_USER_LOCATION' : null ,
38
38
tooltip : renderer === 'button' ? 'layout.SHOW_USER_LOCATION' : null ,
39
- toggle : {
39
+ toggle : {
40
40
label : renderer === 'item' ? 'layout.HIDE_USER_LOCATION' : null ,
41
- tooltip : renderer === 'button' ? 'layout.HIDE_USER_LOCATION' : null ,
41
+ tooltip : renderer === 'button' ? 'layout.HIDE_USER_LOCATION' : null ,
42
42
} ,
43
43
renderer,
44
- component : 'tools/KGeolocateTool'
44
+ component : 'tools/KGeolocateTool'
45
45
}
46
46
} ,
47
47
activeLocationSearchMode : ( options ) => {
@@ -50,8 +50,8 @@ module.exports = {
50
50
const renderer = options ?. renderer || 'button'
51
51
const mode = options ?. mode || 'search-location'
52
52
return {
53
- id : 'search-location' ,
54
- icon : 'las la-search-location' ,
53
+ id : 'search-location' ,
54
+ icon : 'las la-search-location' ,
55
55
label : renderer === 'item' ? 'layout.SEARCH_LOCATION' : null ,
56
56
tooltip : renderer === 'button' ? 'layout.SEARCH_LOCATION' : null ,
57
57
handler : { name : 'setTopPaneMode' , params : [ mode ] } ,
@@ -66,29 +66,29 @@ module.exports = {
66
66
return [
67
67
module . exports . restoreMode ( { mode : restoreMode , icon : options ?. icon , tooltip : options ?. tooltip } ) ,
68
68
helpers . verticalSeparator ( ) ,
69
- {
70
- component : 'tools/KSearchTool' ,
69
+ {
70
+ component : 'tools/KSearchTool' ,
71
71
geocoders,
72
- autofocus : true
72
+ autofocus : true
73
73
}
74
74
]
75
75
} ,
76
76
activeMeasureToolMode : ( options ) => {
77
- // renderer: renderer to be used to display the action
77
+ // renderer: renderer to be used to display the action
78
78
// mode: the mode used to declare the location search
79
79
const renderer = options ?. renderer || 'item'
80
80
const mode = options ?. mode || 'measure-tool'
81
81
return {
82
- id : 'measure-tool' ,
83
- icon : 'las la-ruler-combined' ,
82
+ id : 'measure-tool' ,
83
+ icon : 'las la-ruler-combined' ,
84
84
label : renderer === 'item' ? 'layout.MEASURE_TOOL' : null ,
85
85
tooltip : renderer === 'button' ? 'layout.MEASURE_TOOL' : null ,
86
86
handler : { name : 'setTopPaneMode' , params : [ mode ] } ,
87
87
renderer
88
88
}
89
89
} ,
90
90
measureToolMode : ( options ) => {
91
- // restoreMode: mode to be restored when closing the mode
91
+ // restoreMode: mode to be restored when closing the mode
92
92
const restoreMode = options ?. restoreMode || 'default'
93
93
return [
94
94
module . exports . restoreMode ( { mode : restoreMode , icon : options ?. icon , tooltip : options ?. tooltip } ) ,
@@ -98,59 +98,81 @@ module.exports = {
98
98
} ,
99
99
toggleLegend : ( options ) => {
100
100
// renderer: renderer to be used to display the action
101
- const renderer = options ?. renderer || 'item'
101
+ const renderer = options ?. renderer || 'item'
102
102
return helpers . toggleWidget ( {
103
- widgetId : 'legend-widget' ,
104
- icon : 'las la-atlas' ,
105
- showMessage : 'layout.SHOW_LEGEND' ,
106
- hideMessage : 'layout.HIDE_LEGEND' ,
103
+ widgetId : 'legend-widget' ,
104
+ icon : 'las la-atlas' ,
105
+ showMessage : 'layout.SHOW_LEGEND' ,
106
+ hideMessage : 'layout.HIDE_LEGEND' ,
107
107
renderer
108
108
} )
109
109
} ,
110
110
toggleTimeSeries : ( options ) => {
111
111
// renderer: renderer to be used to display the action
112
112
const renderer = options ?. renderer || 'item'
113
113
return helpers . toggleWidget ( {
114
- widgetId : 'time-series-widget' ,
115
- icon : 'las la-chart-line' ,
116
- showMessage : 'layout.SHOW_TIME_SERIES' ,
117
- hideMessage : 'layout.HIDE_TIME_SERIES' ,
114
+ widgetId : 'time-series-widget' ,
115
+ icon : 'las la-chart-line' ,
116
+ showMessage : 'layout.SHOW_TIME_SERIES' ,
117
+ hideMessage : 'layout.HIDE_TIME_SERIES' ,
118
+ renderer
119
+ } )
120
+ } ,
121
+ toggleSelection : ( options ) => {
122
+ // renderer: renderer to be used to display the action
123
+ const renderer = options ?. renderer || 'item'
124
+ return helpers . toggleWidget ( {
125
+ widgetId : 'selection-widget' ,
126
+ icon : 'las la-object-group' ,
127
+ showMessage : 'layout.SHOW_DISPLAY_SELECTION' ,
128
+ hideMessage : 'layout.HIDE_DISPLAY_SELECTION' ,
118
129
renderer
119
- } )
130
+ } )
131
+ } ,
132
+ toggleStyleManager : ( options ) => {
133
+ // renderer: renderer to be used to display the action
134
+ const renderer = options ?. renderer || 'item'
135
+ return helpers . toggleWidget ( {
136
+ widgetId : 'style-manager' ,
137
+ icon : 'las la-paint-brush' ,
138
+ showMessage : 'layout.SHOW_DISPLAY_STYLES' ,
139
+ hideMessage : 'layout.HIDE_DISPLAY_STYLES' ,
140
+ renderer
141
+ } )
120
142
} ,
121
143
togglePosition : ( options ) => {
122
144
// renderer: renderer to be used to display the action
123
- const renderer = options ?. renderer || 'item'
145
+ const renderer = options ?. renderer || 'item'
124
146
return helpers . toggleSticky ( {
125
- stickyId : 'position-sticky' ,
126
- icon : 'las la-plus' ,
127
- showMessage : 'layout.SHOW_POSITION' ,
128
- hideMessage : 'layout.HIDE_POSITION' ,
147
+ stickyId : 'position-sticky' ,
148
+ icon : 'las la-plus' ,
149
+ showMessage : 'layout.SHOW_POSITION' ,
150
+ hideMessage : 'layout.HIDE_POSITION' ,
129
151
renderer
130
152
} )
131
153
} ,
132
154
toggleNorthArrow : ( options ) => {
133
155
// renderer: renderer to be used to display the action
134
- const renderer = options ?. renderer || 'item'
156
+ const renderer = options ?. renderer || 'item'
135
157
return helpers . toggleSticky ( {
136
- stickyId : 'north-arrow-sticky' ,
137
- icon : 'las la-location-arrow' ,
138
- showMessage : 'layout.SHOW_NORTH_ARROW' ,
139
- hideMessage : 'layout.HIDE_NORTH_ARROW' ,
158
+ stickyId : 'north-arrow-sticky' ,
159
+ icon : 'las la-location-arrow' ,
160
+ showMessage : 'layout.SHOW_NORTH_ARROW' ,
161
+ hideMessage : 'layout.HIDE_NORTH_ARROW' ,
140
162
renderer
141
163
} )
142
164
} ,
143
165
toggleFullscreen : ( options ) => {
144
166
// renderer: renderer to be used to display the action
145
- const renderer = options ?. renderer || 'item'
167
+ const renderer = options ?. renderer || 'item'
146
168
return {
147
169
id : 'toggle-fullscreen' ,
148
170
component : 'action/KToggleFullscreenAction' ,
149
- icon : 'las la-expand' ,
150
- label : renderer === 'item' ? 'layout.ENTER_FULLSCREEN' : null ,
171
+ icon : 'las la-expand' ,
172
+ label : renderer === 'item' ? 'layout.ENTER_FULLSCREEN' : null ,
151
173
tooltip : renderer === 'button' ? 'layout.ENTER_FULLSCREEN' : null ,
152
- toggle : {
153
- icon : 'las la-compress' ,
174
+ toggle : {
175
+ icon : 'las la-compress' ,
154
176
label : renderer === 'item' ? 'layout.EXIT_FULLSCREEN' : null ,
155
177
tooltip : renderer === 'button' ? 'layout.EXIT_FULLSCREEN' : null
156
178
} ,
@@ -165,7 +187,7 @@ module.exports = {
165
187
const icon = options ?. icon || 'las la-times'
166
188
const tooltip = options ?. tooltip || null
167
189
return {
168
- id : `restore-${ mode } ` ,
190
+ id : `restore-${ mode } ` ,
169
191
icon,
170
192
tooltip,
171
193
handler : { name : 'setTopPaneMode' , params : [ mode ] }
0 commit comments