Skip to content

Commit

Permalink
Donut gauge now uses limitMin and limitMax (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantonio authored and kplindegaard committed Jul 8, 2017
1 parent 8c8bbea commit ef87687
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
11 changes: 10 additions & 1 deletion dist/gauge.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,16 @@ class BaseDonut extends BaseGauge
set: (value) ->
@value = @parseValue(value)
if @value > @maxValue
@maxValue = @value * 1.1
if @options.limitMax
@value = @maxValue
else
@maxValue = @value
else if @value < @minValue
if @options.limitMin
@value = @minValue
else
@minValue = @value

AnimationUpdater.run(@forceUpdate)
@forceUpdate = false

Expand Down
12 changes: 11 additions & 1 deletion dist/gauge.js

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

0 comments on commit ef87687

Please sign in to comment.