Skip to content

Commit c77f7e8

Browse files
committed
wip: Provide ready-made configuration snippets to help set up the app's configuration file #1140
wip:
1 parent 397053c commit c77f7e8

File tree

3 files changed

+32
-23
lines changed

3 files changed

+32
-23
lines changed

extras/configs/stickies.js

+31-23
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
11
module.exports = {
2-
POSITION: {
3-
id: 'position-sticky',
4-
position: 'top',
5-
offset: [0, 42],
6-
component: 'stickies/KPosition',
7-
visible: false
2+
position: (visible = false) => {
3+
return {
4+
id: 'position-sticky',
5+
position: 'top',
6+
offset: [0, 42],
7+
component: 'stickies/KPosition',
8+
visible,
9+
}
810
},
9-
TARGET: {
10-
id: 'target-sticky',
11-
position: 'center',
12-
offset: [0, -20],
13-
component: 'stickies/KTarget',
14-
visible: false
11+
target: (visible = false) => {
12+
return {
13+
id: 'target-sticky',
14+
position: 'center',
15+
offset: [0, -20],
16+
component: 'stickies/KTarget',
17+
visible
18+
}
1519
},
16-
NORTH: {
17-
id: 'north-sticky',
18-
position: 'bottom-left',
19-
offset: [100, 2],
20-
component: 'stickies/KNorth',
21-
visible: true
20+
northArrow: (visible = true) => {
21+
return {
22+
id: 'north-sticky',
23+
position: 'bottom-left',
24+
offset: [100, 2],
25+
component: 'stickies/KNorthArrow',
26+
visible
27+
}
2228
},
23-
ATTRIBUTION: {
24-
id: 'attribution-sticky',
25-
position: 'bottom-right',
26-
offset: [80, 24],
27-
component: 'stickies/KAttribution'
29+
attribution: (visible = true) => {
30+
return {
31+
id: 'attribution-sticky',
32+
position: 'bottom-right',
33+
offset: [80, 24],
34+
component: 'stickies/KAttribution'
35+
}
2836
}
2937
}

map/client/composables/location.js

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export function useLocation () {
5656
async function search (pattern, limit = 25) {
5757
const project = getActivityProject()
5858
const planet = (project ? project.getPlanetApi().getConfig() : api.getConfig())
59+
console.log(planet)
5960
return searchLocation(planet, pattern, {
6061
geocoders: selectedGeocoders.value,
6162
viewbox: selectedViewbox.value,

0 commit comments

Comments
 (0)