|
@ -130,7 +130,7 @@ class Label { |
|
|
// When the textAlign property is 'left', make label left-justified
|
|
|
// When the textAlign property is 'left', make label left-justified
|
|
|
if (this.options.font.textAlign === 'left') { |
|
|
if (this.options.font.textAlign === 'left') { |
|
|
ctx.textAlign = this.options.font.textAlign; |
|
|
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 { |
|
|
} else { |
|
|
ctx.textAlign = 'center'; |
|
|
ctx.textAlign = 'center'; |
|
|
} |
|
|
} |
|
|