From bd1fa5b201806a75fc95c9750681d4f2babf611e Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 15 Jan 2016 19:35:48 -0600 Subject: [PATCH] (from Denk Padje) a small patch here that uses math.round() instead of int() for "percent" mapping in Canvas tooltip. --- Nasal/canvas/tooltip.nas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nasal/canvas/tooltip.nas b/Nasal/canvas/tooltip.nas index d1c4f0453..caca8819d 100644 --- a/Nasal/canvas/tooltip.nas +++ b/Nasal/canvas/tooltip.nas @@ -166,7 +166,7 @@ var Tooltip = { _remapValue: func(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! if (me._mapping == "on-off") return (val == 1) ? "ON" : "OFF";