Skip to content

Commit

Permalink
extract haloColor
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonhibbs committed Jun 4, 2020
1 parent 6805573 commit 218f949
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions src/components/CastleMarkers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ export default class CastleMarkers extends Vue {
return 'hsl(160, 2%, 28%)'
}
get haloColor() {
return [
'interpolate',
['linear'],
['zoom'],
5,
'#ebebea',
12,
'hsl(36, 28%, 93%)',
]
}
get circlePaintBase() {
return {
'circle-color': this.circleColor,
Expand All @@ -48,15 +60,7 @@ export default class CastleMarkers extends Vue {
14,
10,
],
'circle-stroke-color': [
'interpolate',
['linear'],
['zoom'],
5,
'#ebebea',
12,
'hsl(36, 28%, 93%)',
],
'circle-stroke-color': this.haloColor,
'circle-stroke-width': 1,
'circle-pitch-alignment': 'map',
'circle-color-transition': {
Expand Down Expand Up @@ -151,15 +155,7 @@ export default class CastleMarkers extends Vue {
},
paint: {
'text-color': 'hsl(160, 2%, 18%)',
'text-halo-color': [
'interpolate',
['linear'],
['zoom'],
5,
'#ebebea',
12,
'hsl(36, 28%, 93%)',
],
'text-halo-color': this.haloColor,
'text-halo-width': 2,
'text-opacity': [
'case',
Expand All @@ -169,7 +165,6 @@ export default class CastleMarkers extends Vue {
1,
0,
],
// ['step', ['zoom'], 0, 8.5, 1],
'text-opacity-transition': {
duration: 120,
},
Expand Down

0 comments on commit 218f949

Please sign in to comment.