Skip to content

Commit

Permalink
broken right highlights fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhus committed Sep 14, 2016
1 parent da837a8 commit 56ba913
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gauge.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gauge.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/LinearGauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function drawLinearBarProgress(context, options, x, y, w, h) {
*/
function drawLinearBarHighlights(context, options) {
let {isVertical, width, length, barWidth, barOffset, barMargin,
X, Y, ticksLength} = context.barDimensions;
X, Y, ticksLength, ticksPadding} = context.barDimensions;

if (!options.highlights) return ;

Expand All @@ -393,8 +393,8 @@ function drawLinearBarHighlights(context, options) {
let eX = round(isVertical ? X + tickOffset : X + barMargin + barOffset);
let eH = (options.ticksWidth / 100 * width);
let eY = isVertical ? Y + length - barMargin - barOffset: Y + tickOffset;
let hLeft = round((options.ticksWidth + options.ticksPadding)/ 100 * width);
let hRight = round(barWidth + options.ticksPadding * width);
let hLeft = round((options.ticksWidth / 100 + ticksPadding) * width);
let hRight = round(barWidth + ticksPadding * width);

context.save();

Expand Down
2 changes: 1 addition & 1 deletion test-coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 56ba913

Please sign in to comment.