Skip to content

Commit

Permalink
Fix spinfield doesn't adjust the value
Browse files Browse the repository at this point in the history
    - Condition modified for getPrecision.
    - it was not handling the cases for dot value less then 0.
Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Change-Id: I740f86e9477656d371ba3b8793bff99671444d7c
  • Loading branch information
Darshan-upadhyay1110 committed Oct 18, 2023
1 parent 707a577 commit 90cfa44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browser/src/control/Control.JSDialogBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
data = Math.abs(data);
var str = '' + data;
var dot = str.indexOf('.');
return dot ? 1 / Math.pow(10, str.length - dot - 1) : 1;
return dot > 0 ? 1 / Math.pow(10, str.length - dot - 1) : 1;
};

if (data.min != undefined)
Expand Down

0 comments on commit 90cfa44

Please sign in to comment.