From 049e57baa89701a88a81443e64aec50706e76ad0 Mon Sep 17 00:00:00 2001 From: Atul Varma Date: Fri, 20 Jan 2012 13:11:59 +0900 Subject: [PATCH] Use Number.toFixed() for alpha component of rgba quads when reflecting color picker value to CSS source. --- static-files/scripts/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static-files/scripts/editor.js b/static-files/scripts/editor.js index ae228e5..8abcdd1 100644 --- a/static-files/scripts/editor.js +++ b/static-files/scripts/editor.js @@ -159,7 +159,7 @@ var Editor = (function() { value = 'rgba(' + Math.floor(rgba.r * 255) + ', ' + Math.floor(rgba.g * 255) + ', ' + Math.floor(rgba.b * 255) + ', ' + - rgba.a + ')'; + rgba.a.toFixed(3) + ')'; } inCursorActivity = true; editor.replaceRange(value, {