1
1
module . exports = {
2
- TOGGLE_LEGEND_VISIBILITY : {
3
- id : 'toggle-legend' ,
4
- component : 'action/KToggleWidgetVisibility' ,
5
- widgetId : 'legend-widget' ,
6
- icon : 'las la-list' ,
7
- tooltip : 'KToggleWidgetVisibility.SHOW_LEGEND' ,
8
- toggle : { tooltip : 'KToggleWidgetVisibility.HIDE_LEGEND' }
2
+ toggleFullscreen : ( renderer = 'item' ) => {
3
+ return {
4
+ id : 'toggle-fullscreen' ,
5
+ component : 'action/KToggleFullscreenAction' ,
6
+ icon : 'las la-expand' ,
7
+ label : renderer === 'item' ? 'layout.ENTER_FULLSCREEN' : null ,
8
+ tooltip : renderer === 'button' ? 'layout.ENTER_FULLSCREEN' : null ,
9
+ toggle : {
10
+ icon : 'las la-compress' ,
11
+ label : renderer === 'item' ? 'layout.EXIT_FULLSCREEN' : null ,
12
+ tooltip : renderer === 'button' ? 'layout.EXIT_FULLSCREEN' : null
13
+ } ,
14
+ renderer
15
+ }
9
16
} ,
10
- TOGGLE_POSITION_VISIBILITY : {
11
- id : 'toggle-position-sticky' ,
12
- component : 'action/KToggleStickyVisibility' ,
13
- stickyId : 'position-sticky' ,
14
- icon : 'las la-plus' ,
15
- label : 'KToggleStickyVisibility.SHOW_POSITION' ,
16
- toggle : { label : 'KToggleStickyVisibility.HIDE_POSITION' }
17
+ toggleLegendVisibility : ( renderer = 'item' ) => {
18
+ return {
19
+ id : 'toggle-legend' ,
20
+ component : 'action/KToggleWidgetVisibility' ,
21
+ widgetId : 'legend-widget' ,
22
+ icon : 'las la-list' ,
23
+ label : renderer === 'item' ? 'layout.SHOW_LEGEND' : null ,
24
+ tooltip : renderer === 'button' ? 'layout.SHOW_LEGEND' : null ,
25
+ toggle : {
26
+ label : renderer === 'item' ? 'layout.HIDE_LEGEND' : null ,
27
+ tooltip : renderer === 'button' ? 'layout.HIDE_LEGEND' : null ,
28
+ } ,
29
+ renderer
30
+ }
17
31
} ,
18
- TOGGLE_NORTH_VISIBILITY : {
19
- id : 'toggle-north-sticky' ,
20
- component : 'action/KToggleStickyVisibility' ,
21
- stickyId : 'north-sticky' ,
22
- icon : 'las la-location-arrow' ,
23
- label : 'KToggleStickyVisibility.SHOW_NORTH' ,
24
- toggle : { label : 'KToggleStickyVisibility.HIDE_NORTH' }
32
+ togglePositionVisibility : ( renderer = 'item' ) => {
33
+ return {
34
+ id : 'toggle-position-sticky' ,
35
+ component : 'action/KToggleStickyVisibility' ,
36
+ stickyId : 'position-sticky' ,
37
+ icon : 'las la-plus' ,
38
+ label : renderer === 'item' ? 'layout.SHOW_POSITION' : null ,
39
+ tooltip : renderer === 'button' ? 'layout.SHOW_POSITION' : null ,
40
+ toggle : {
41
+ label : renderer === 'item' ? 'layout.HIDE_POSITION' : null ,
42
+ tooltip : renderer === 'button' ? 'layout.HIDE_POSITION' : null ,
43
+ } ,
44
+ renderer
45
+ }
25
46
} ,
26
- TOGGLE_FULLSCREEN : {
27
- id : 'toggle-fullscreen' ,
28
- icon : 'las la-expand' , tooltip : 'mixins.activity.ENTER_FULLSCREEN' ,
29
- toggle : { icon : 'las la-compress' , tooltip : 'mixins.activity.EXIT_FULLSCREEN' } ,
30
- component : 'action/KToggleFullscreenAction'
47
+ toggleNorthArrowVisibility : ( renderer = 'item' ) => {
48
+ return {
49
+ id : 'toggle-north-arrow-sticky' ,
50
+ component : 'action/layout' ,
51
+ stickyId : 'north-arrow-sticky' ,
52
+ icon : 'las la-location-arrow' ,
53
+ label : renderer === 'item' ? 'layout.SHOW_NORTH_ARROW' : null ,
54
+ tooltip : renderer === 'button' ? 'layout.SHOW_NORTH_ARROW' : null ,
55
+ toggle : {
56
+ label : renderer === 'item' ? 'layout.HIDE_NORTH_ARROW' : null ,
57
+ tooltip : renderer === 'button' ? 'layout.HIDE_NORTH_ARROW' : null ,
58
+ } ,
59
+ renderer
60
+ }
31
61
}
32
62
}
0 commit comments