File tree 2 files changed +27
-27
lines changed
map/client/components/stickies
2 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = {
2
- position : ( visible = false ) => {
3
- return {
2
+ position : ( options ) => {
3
+ return Object . assign ( {
4
4
id : 'position-sticky' ,
5
- position : 'top' ,
5
+ visible : false ,
6
6
offset : [ 0 , 42 ] ,
7
- component : 'stickies/KPosition ' ,
8
- visible ,
9
- }
7
+ position : 'top ' ,
8
+ component : 'stickies/KPosition'
9
+ } , options )
10
10
} ,
11
- target : ( visible = false ) => {
12
- return {
13
- id : 'target-sticky' ,
14
- position : 'center' ,
11
+ target : ( options ) => {
12
+ return Object . assign ( {
13
+ id : 'target-sticky' ,
14
+ visible : false ,
15
15
offset : [ 0 , - 20 ] ,
16
- component : 'stickies/KTarget ' ,
17
- visible
18
- }
16
+ position : 'center ' ,
17
+ component : 'stickies/KTarget'
18
+ } , options )
19
19
} ,
20
- northArrow : ( visible = true ) => {
21
- return {
22
- id : 'north-arrow-sticky' ,
23
- position : 'bottom-left' ,
20
+ northArrow : ( options ) => {
21
+ return Object . assign ( {
22
+ id : 'north-arrow-sticky' ,
23
+ visible : true ,
24
24
offset : [ 100 , 2 ] ,
25
- component : 'stickies/KNorthArrow ' ,
26
- visible
27
- }
25
+ position : 'bottom-left ' ,
26
+ component : 'stickies/KNorthArrow'
27
+ } , options )
28
28
} ,
29
- attribution : ( visible = true ) => {
30
- return {
29
+ attribution : ( options ) => {
30
+ return Object . assign ( {
31
31
id : 'attribution-sticky' ,
32
+ visible : true ,
32
33
position : 'bottom-right' ,
33
34
offset : [ 80 , 24 ] ,
34
- component : 'stickies/KAttribution' ,
35
- visible
36
- }
35
+ component : 'stickies/KAttribution'
36
+ } , options )
37
37
}
38
38
}
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ async function onClose () {
72
72
73
73
onMounted (() => {
74
74
// Show target sticky
75
- if (! _ .isEmpty (props .target )) Layout .showSticky (props .target )
75
+ if (! _ .isEmpty (props .targetId )) Layout .showSticky (props .targetId )
76
76
// Listen move events
77
77
if (CurrentActivity .value ) {
78
78
CurrentActivity .value .$engineEvents .on (' movestart' , updatePosition)
@@ -84,7 +84,7 @@ onMounted(() => {
84
84
})
85
85
// Hooks
86
86
onBeforeUnmount (() => {
87
- if (! _ .isEmpty (props .target )) Layout .hideSticky (props .target )
87
+ if (! _ .isEmpty (props .targetId )) Layout .hideSticky (props .targetId )
88
88
// Stop listening move events
89
89
if (CurrentActivity .value ) {
90
90
CurrentActivity .value .$engineEvents .off (' movestart' , updatePosition)
You can’t perform that action at this time.
0 commit comments