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'; }