Skip to content

Commit

Permalink
change alignment-baseline to dominant-baseline for ff
Browse files Browse the repository at this point in the history
  • Loading branch information
joewdavies committed May 27, 2024
1 parent 6d5e2a7 commit 76e50b3
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
36 changes: 18 additions & 18 deletions build/eurostatmap.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/eurostatmap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eurostat-map",
"version": "3.6.115",
"version": "3.6.116",
"description": "Reusable library to quickly create and customise web maps showing Eurostat data directly retrieved from Eurostat database.",
"keywords": [
"eurostat",
Expand Down
4 changes: 2 additions & 2 deletions src/legend/legend-categorical.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const legend = function (map, config) {
.attr('class', 'eurostat-map-legend-label')
.attr('x', out.boxPadding + out.shapeWidth + out.labelOffset)
.attr('y', y + out.shapeHeight * 0.5)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text(m.classToText() ? m.classToText()[ecl_] : ecl_)
.style('font-size', out.labelFontSize + 'px')
.style('font-family', m.fontFamily_)
Expand Down Expand Up @@ -161,7 +161,7 @@ export const legend = function (map, config) {
.attr('class', 'eurostat-map-legend-label')
.attr('x', out.boxPadding + out.shapeWidth + out.labelOffset)
.attr('y', y + out.shapeHeight * 0.5)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text(out.noDataText)
.style('font-size', out.labelFontSize + 'px')
.style('font-family', m.fontFamily_)
Expand Down
2 changes: 1 addition & 1 deletion src/legend/legend-choropleth-bivariate.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export const legend = function (map, config) {
lgg.append('text')
.attr('x', out.boxPadding + out.noDataShapeSize + out.boxPadding)
.attr('y', y + out.noDataShapeSize * 0.5)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text(out.noDataText)
.style('font-size', out.labelFontSize + 'px')
.style('font-family', m.fontFamily_)
Expand Down
4 changes: 2 additions & 2 deletions src/legend/legend-choropleth.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const legend = function (map, config) {
.attr('class', 'eurostatmap-legend-label')
.attr('x', out.boxPadding + Math.max(out.shapeWidth, out.sepLineLength) + out.labelOffset)
.attr('y', y + out.shapeHeight)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text(out.labels ? out.labels[i] : f(m.classifier().invertExtent(ecl)[out.ascending ? 0 : 1]))
.style('font-size', out.labelFontSize + 'px')
.style('font-family', m.fontFamily_)
Expand Down Expand Up @@ -259,7 +259,7 @@ export const legend = function (map, config) {
.attr('class', 'eurostatmap-legend-label')
.attr('x', out.boxPadding + out.shapeWidth + out.labelOffset)
.attr('y', y + out.shapeHeight * 0.5)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text(out.noDataText)
.style('font-size', out.labelFontSize + 'px')
.style('font-family', m.fontFamily_)
Expand Down
4 changes: 2 additions & 2 deletions src/legend/legend-piecharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export const legend = function (map, config) {
lgg.append('text')
.attr('x', out.boxPadding + config.shapeWidth + config.labelOffset)
.attr('y', y + config.shapeHeight * 0.5)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text(m.catLabels()[code] || code)
.style('font-size', out.labelFontSize + 'px')
.style('font-family', m.fontFamily_)
Expand Down Expand Up @@ -284,7 +284,7 @@ export const legend = function (map, config) {
lgg.append('text')
.attr('x', out.boxPadding + config.shapeWidth + config.labelOffset)
.attr('y', y + config.shapeHeight * 0.5)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text(config.noDataText)
.style('font-size', out.labelFontSize + 'px')
.style('font-family', m.fontFamily_)
Expand Down
16 changes: 8 additions & 8 deletions src/legend/legend-proportional-symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const legend = function (map, config) {
.style('font-weight', out.titleFontWeight)
.style('font-family', m.fontFamily_)
.style('fill', out.fontFill)
.style('alignment-baseline', 'hanging')
.style('dominant-baseline', 'hanging')
}

let domain = m.classifierSize_.domain()
Expand Down Expand Up @@ -254,8 +254,8 @@ export const legend = function (map, config) {
container
.append('text')
.attr('x', out.colorLegend.labelOffset.x)
.attr('y', out.colorLegend.shapeHeight / 2)
.attr('alignment-baseline', 'middle')
.attr('y', out.colorLegend.shapeHeight / 2 + 1)
.attr('dominant-baseline', 'middle')
.attr('class', 'eurostatmap-legend-label')
.text(noDataText)
.style('font-size', out.labelFontSize + 'px')
Expand Down Expand Up @@ -314,7 +314,7 @@ export const legend = function (map, config) {
.append('text')
.attr('x', labelX)
.attr('y', 0)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.attr('text-anchor', 'start')
.attr('class', 'eurostatmap-legend-label')
.text(labelFormatter(value))
Expand Down Expand Up @@ -380,14 +380,14 @@ export const legend = function (map, config) {

//label position
let labelX = x + m.classifierSize_(m.classifierSize_.domain()[0]) + out.sizeLegend.labelOffset.x
let labelY = out.sizeLegend.shapeOffset.y / 2 //y + out.sizeLegend.labelOffset.y
let labelY = out.sizeLegend.shapeOffset.y / 2 + 1 //y + out.sizeLegend.labelOffset.y

//append label
itemContainer
.append('text')
.attr('x', labelX)
.attr('y', labelY)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.attr('text-anchor', 'start')
.attr('class', 'eurostatmap-legend-label')
.text(labelFormatter(value))
Expand Down Expand Up @@ -451,7 +451,7 @@ export const legend = function (map, config) {
.append('text')
.attr('x', labelX)
.attr('y', labelY)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.attr('text-anchor', 'start')
.attr('class', 'eurostatmap-legend-label')
.text(labelFormatter(value))
Expand Down Expand Up @@ -646,7 +646,7 @@ export const legend = function (map, config) {
.attr('class', 'eurostatmap-legend-label')
.attr('x', out.colorLegend.labelOffset.x)
.attr('y', out.colorLegend.shapeHeight)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text((d) => {
let text = f(m.classifierColor_.invertExtent(out.ascending ? ecl + 1 : ecl - 1)[out.ascending ? 0 : 1])
return text
Expand Down
4 changes: 2 additions & 2 deletions src/legend/legend-stripe-composition.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const legend = function (map, config) {
lgg.append('text')
.attr('x', out.boxPadding + out.shapeWidth + out.labelOffset)
.attr('y', y + out.shapeHeight * 0.5)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text(m.catLabels()[code] || code)
.style('font-size', out.labelFontSize + 'px')
.style('font-family', m.fontFamily_)
Expand Down Expand Up @@ -148,7 +148,7 @@ export const legend = function (map, config) {
lgg.append('text')
.attr('x', out.boxPadding + out.shapeWidth + out.labelOffset)
.attr('y', y + out.shapeHeight * 0.5)
.attr('alignment-baseline', 'middle')
.attr('dominant-baseline', 'middle')
.text(out.noDataText)
.style('font-size', out.labelFontSize + 'px')
.style('font-family', m.fontFamily_)
Expand Down

0 comments on commit 76e50b3

Please sign in to comment.