Skip to content

Commit

Permalink
Fix issue with negative bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
combefis committed Mar 9, 2018
1 parent 36a3149 commit f7f1071
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions justgage.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ JustGage = function(config) {

var obj = this;

var min = -config.min;
config.min += min;
config.max += min;
config.value += min;

// Helps in case developer wants to debug it. unobtrusive
if (config === null || config === undefined) {
console.log('* justgage: Make sure to pass options to the constructor!');
Expand Down

0 comments on commit f7f1071

Please sign in to comment.