Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3817 closed defect (fixed)

[PATCH] Missing rounding in tooltip

Reported by: fatherbushido Owned by: elexis
Priority: Should Have Milestone: Alpha 20
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

when using relative template, armour tooltip has many decimals. Armour tooltip may be round to one 1 decimal like attack tooltip.

Attachments (1)

tooltip.diff (1.7 KB ) - added by fatherbushido 8 years ago.

Download all attachments as: .zip

Change History (6)

by fatherbushido, 8 years ago

Attachment: tooltip.diff added

comment:1 by fatherbushido, 8 years ago

Priority: Must HaveShould Have

comment:2 by elexis, 8 years ago

Can you provide a sample patch to produce the rounding error?

Not sure if we need one place after the comma. If we do, toFixed seems like the right function to use, if not, we should use Math.round.

comment:3 by fatherbushido, 8 years ago

For decimals :docs

For an example : :notagoodone

comment:4 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 17897:

Add missing round to the armor tooltip. Patch by fatherbushido, fixes #3817.

comment:5 by elexis, 8 years ago

Keywords: review removed

Thanks for the patch.

Mostly committing this because

  • in case of rational numbers, we need to show at most 0 or 1 digits
  • all the other places use ToFixed(1)
  • the digit after the comma can make a difference of some percent, so having one decimal is legit for the folks computing equations
Note: See TracTickets for help on using tickets.