Opened 15 years ago

Closed 15 years ago

#3797 closed bug (worksforme)

Slider doesn't always return whole numbers

Reported by: fracmak Owned by:
Priority: major Milestone: 1.7
Component: ui.slider Version: 1.6rc4
Keywords: Cc:
Blocked by: Blocking:

Description

Sometimes when dragging the mouse around, I get a decimal rounding error, so even though I specify a step of 1, I sometimes get values like 23.9999999999999. This is easily fixed by returning a Math.round() of the value. I've attached a patch.

Attachments (1)

slider.patch.txt (396 bytes) - added by fracmak 15 years ago.
Rounding error patch

Download all attachments as: .zip

Change History (3)

Changed 15 years ago by fracmak

Attachment: slider.patch.txt added

Rounding error patch

comment:1 Changed 15 years ago by Scott González

Milestone: TBD1.6
Priority: minormajor

The patch is invalid since decimals are valid values. I haven't looked into this at all, but this may be related to some of the dimensions methods from core returning crazy values.

comment:2 Changed 15 years ago by paul

Resolution: worksforme
Status: newclosed

Not reproducable for me anymore.

Note: See TracTickets for help on using tickets.