Browse Source

Fix a typo and swap SHR for mul-by-coeff

codeClimate
Coleman Kane 9 years ago
parent
commit
37fbe7f43c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/network/modules/components/shared/Label.js

+ 1
- 1
lib/network/modules/components/shared/Label.js View File

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

Loading…
Cancel
Save