From c9964b0ee9b236a6122026d57822ea65f0137687 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Fri, 25 May 2018 09:04:12 -0400 Subject: [PATCH] Fix text alignment for the scale. For svg text elements, `alignment-baseline` is not a valid property (though Chrome honors it). One must use `dominant-baseline` instead. --- src/ui/scaleWidget.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/scaleWidget.js b/src/ui/scaleWidget.js index 5774fb4f50..b867aa7bd8 100644 --- a/src/ui/scaleWidget.js +++ b/src/ui/scaleWidget.js @@ -237,7 +237,7 @@ var scaleWidget = function (arg) { x: width / 2, y: sw * 2, 'text-anchor': 'middle', - 'alignment-baseline': 'hanging' + 'dominant-baseline': 'hanging' }); break; case 'top': @@ -246,7 +246,7 @@ var scaleWidget = function (arg) { x: width / 2, y: height - sw * 2, 'text-anchor': 'middle', - 'alignment-baseline': 'baseline' + 'dominant-baseline': 'alphabetic' }); break; case 'left': @@ -255,7 +255,7 @@ var scaleWidget = function (arg) { x: width - sw * 2, y: height / 2, 'text-anchor': 'end', - 'alignment-baseline': 'middle' + 'dominant-baseline': 'middle' }); break; case 'right': @@ -264,7 +264,7 @@ var scaleWidget = function (arg) { x: sw * 2, y: height / 2, 'text-anchor': 'start', - 'alignment-baseline': 'middle' + 'dominant-baseline': 'middle' }); break; }