From 37fbe7f43ce419f0dcbd1d476dcc7798bdfdaa0b Mon Sep 17 00:00:00 2001 From: Coleman Kane Date: Mon, 7 Sep 2015 11:35:14 -0400 Subject: [PATCH] Fix a typo and swap SHR for mul-by-coeff --- lib/network/modules/components/shared/Label.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/network/modules/components/shared/Label.js b/lib/network/modules/components/shared/Label.js index e3983127..1e61d937 100644 --- a/lib/network/modules/components/shared/Label.js +++ b/lib/network/modules/components/shared/Label.js @@ -130,7 +130,7 @@ class Label { // When the textAlign property is 'left', make label left-justified if (this.options.font.textAlign === 'left') { ctx.textAlign = this.options.font.textAlign; - x = x - (this.size.wideth >> 1); // Shift label 1/2-way (>>1 == div by 2) left + x = x - 0.5 * this.size.width; // Shift label 1/2-distance to the left } else { ctx.textAlign = 'center'; }