Skip to content

Commit 958f703

Browse files
authored
Merge pull request #2 from Abstractn/bugfix/proprange-decimals
2 parents 2061acc + b3d8819 commit 958f703

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/components/proportional-range/proportional-range.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ export class ProportionalRange implements AbsComponent {
2222

2323
private setCalculateButtonEvent(): void {
2424
this.generateButtonNode.addEventListener('click', (event) => {
25-
const oldMinValue = this.oldMinValueInputNode.value !== '' ? parseInt(this.oldMinValueInputNode.value) : 0;
26-
const oldMaxValue = this.oldMaxValueInputNode.value !== '' ? parseInt(this.oldMaxValueInputNode.value) : 100;
27-
const newMinValue = this.newMinValueInputNode.value !== '' ? parseInt(this.newMinValueInputNode.value) : 0;
28-
const newMaxValue = this.newMaxValueInputNode.value !== '' ? parseInt(this.newMaxValueInputNode.value) : 1;
29-
const valueValue = this.valueInputNode.value !== '' ? parseInt(this.valueInputNode.value) : 1;
25+
const oldMinValue = this.oldMinValueInputNode.value !== '' ? parseFloat(this.oldMinValueInputNode.value) : 0;
26+
const oldMaxValue = this.oldMaxValueInputNode.value !== '' ? parseFloat(this.oldMaxValueInputNode.value) : 100;
27+
const newMinValue = this.newMinValueInputNode.value !== '' ? parseFloat(this.newMinValueInputNode.value) : 0;
28+
const newMaxValue = this.newMaxValueInputNode.value !== '' ? parseFloat(this.newMaxValueInputNode.value) : 1;
29+
const valueValue = this.valueInputNode.value !== '' ? parseFloat(this.valueInputNode.value) : 1;
3030
const res = proportionalRange(
3131
oldMinValue, oldMaxValue,
3232
newMinValue, newMaxValue,

0 commit comments

Comments
 (0)