Skip to content

Commit

Permalink
Improve contrast of wms legend text
Browse files Browse the repository at this point in the history
  • Loading branch information
wkramer committed May 28, 2024
1 parent 9ae9e1b commit a3e9424
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/components/wms/ColourBar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<div id="legend" :class="isVisible ? 'invisible' : ''">
<div
id="legend"
:class="isVisible ? 'invisible' : ''"
class="legend_container"
>
<svg id="colourbar" class="colourbar"></svg>
<LegendInput
parentId="min-legend"
Expand Down Expand Up @@ -49,7 +53,7 @@ onMounted(() => {
const svg = d3.select('#colourbar')
group = svg
.append('g')
.attr('transform', 'translate(5, 55)')
.attr('transform', 'translate(25, 25)')
.style('pointer-events', 'visiblePainted')
updateColourBar()
})
Expand Down Expand Up @@ -92,17 +96,15 @@ function updateColourBar() {
.colourbar {
width: 300px;
height: 85px;
height: 60px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
text-shadow:
rgb(var(--v-theme-background)) 0px 0px 1px,
rgb(var(--v-theme-background)) 0px 0px 1px,
rgb(var(--v-theme-background)) 0px 0px 1px,
rgb(var(--v-theme-background)) 0px 0px 1px,
rgb(var(--v-theme-background)) 0px 0px 1px,
rgb(var(--v-theme-background)) 0px 0px 1px;
rgb(var(--v-theme-background)) 1px 1px 1px,
rgb(var(--v-theme-background)) -1px 1px 1px,
rgb(var(--v-theme-background)) 1px -1px 1px,
rgb(var(--v-theme-background)) -1px -1px 1px;
}
.colourbar :deep(.axis .tick line) {
Expand Down

0 comments on commit a3e9424

Please sign in to comment.