diff options
-rw-r--r-- | index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/index.js b/index.js index 0e52b67..662edbe 100644 --- a/index.js +++ b/index.js @@ -46,8 +46,8 @@ class ATBBar { { let i = 0 for (const action of this.queuedActions) { - const rectX = Math.floor(segmentWidth * i) + 2 - const rectW = Math.floor(segmentWidth * (i + action.size)) - rectX - 2 + const rectX = Math.round(segmentWidth * i) + 2 + const rectW = Math.round(segmentWidth * (i + action.size)) - rectX - 2 - (i + action.size === this.segmentCount ? 1 : 0) // Ternary so it doesn't touch the right-edge of the entire ATB gauge box const textX = Math.round(rectX + rectW / 2) const rectH = this.canvas.height - 5 const text = action.label |