From 028102bd992bb18c0fed354cfbe1e1805ce8c0fe Mon Sep 17 00:00:00 2001 From: Jose Raul Perez Date: Sun, 12 Jan 2020 09:40:38 +0100 Subject: [PATCH] chage variable name --- src/core/core.scale.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/core.scale.js b/src/core/core.scale.js index 06f21ec70d2..01aa7178464 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -1276,7 +1276,7 @@ class Scale extends Element { for (i = 0, ilen = items.length; i < ilen; ++i) { const item = items[i]; const tickFont = item.font; - const useTextWithStroke = tickFont.lineWidth > 0 && tickFont.strokeStyle !== ''; + const useStroke = tickFont.lineWidth > 0 && tickFont.strokeStyle !== ''; // Make sure we draw text in the correct color and font ctx.save(); @@ -1287,7 +1287,7 @@ class Scale extends Element { ctx.textBaseline = 'middle'; ctx.textAlign = item.textAlign; - if (useTextWithStroke) { + if (useStroke) { ctx.strokeStyle = tickFont.strokeStyle; ctx.lineWidth = tickFont.lineWidth; } @@ -1297,14 +1297,14 @@ class Scale extends Element { if (isArray(label)) { for (j = 0, jlen = label.length; j < jlen; ++j) { // We just make sure the multiline element is a string here.. - if (useTextWithStroke) { + if (useStroke) { ctx.strokeText('' + label[j], 0, y); } ctx.fillText('' + label[j], 0, y); y += tickFont.lineHeight; } } else { - if (useTextWithStroke) { + if (useStroke) { ctx.strokeText(label, 0, y); } ctx.fillText(label, 0, y);