Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #73 from looker/richard/fix/liquid-gravity
Browse files Browse the repository at this point in the history
Fix liquid fill gauge flow direction
  • Loading branch information
RichardCzechowski authored Feb 11, 2019
2 parents ab313b3 + 70e3c23 commit 5c3cb26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/liquid_fill_gauge.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/examples/liquid_fill_gauge/liquid_fill_gauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ function initialize(d3) {
}

// Update the wave
toPercent = Math.max(config.get("minValue"), Math.min(config.get("maxValue"), to)) / config.get("maxValue");
fromPercent = Math.max(config.get("minValue"), Math.min(config.get("maxValue"), from)) / config.get("maxValue");
const toPercent = Math.max(config.get("minValue"), Math.min(config.get("maxValue"), to)) / config.get("maxValue");
const fromPercent = Math.max(config.get("minValue"), Math.min(config.get("maxValue"), from)) / config.get("maxValue");

if (riseWave) {
waveGroup.attr('transform', 'translate(' + waveGroupXPosition + ',' + waveRiseScale(fromPercent) + ')')
Expand Down

0 comments on commit 5c3cb26

Please sign in to comment.