1
0
Fork 0

(from Denk Padje)

a small patch here that uses math.round() instead of int() for "percent"
mapping in Canvas tooltip.
This commit is contained in:
James Turner 2016-01-15 19:35:48 -06:00
parent 5eeb3d7702
commit bd1fa5b201

View file

@ -166,7 +166,7 @@ var Tooltip = {
_remapValue: func(val) _remapValue: func(val)
{ {
if (me._mapping == "") return val; if (me._mapping == "") return val;
if (me._mapping == "percent") return int(val * 100); if (me._mapping == "percent") return math.round(val * 100);
# TODO - translate me! # TODO - translate me!
if (me._mapping == "on-off") return (val == 1) ? "ON" : "OFF"; if (me._mapping == "on-off") return (val == 1) ? "ON" : "OFF";