[Pkg-javascript-commits] [jquery-minicolors] 18/46: Fix bug where invalid opacity value would revert to rgb instead of rgba

David Prévot taffit at moszumanska.debian.org
Sun Oct 25 17:18:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository jquery-minicolors.

commit 32f2f6afe32eefae67a222fee8e8498aa2b13cb4
Author: Cory LaViska <cory at abeautifulsite.net>
Date:   Thu Sep 17 15:16:51 2015 -0400

    Fix bug where invalid opacity value would revert to rgb instead of rgba
---
 jquery.minicolors.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/jquery.minicolors.js b/jquery.minicolors.js
index 3e5416a..1870503 100644
--- a/jquery.minicolors.js
+++ b/jquery.minicolors.js
@@ -736,10 +736,10 @@
     }
 
     // Parses a string and returns a valid RGB(A) string when possible
-    function parseRgb(string) {
+    function parseRgb(string, obj) {
         values = string.replace(/[^\d,.]/g, '');
         rgba = values.split(',');
-        if( rgba[3] && rgba[3] < 1 ) {
+        if( rgba[3] ) {
             output = 'rgba(' + keepWithin(rgba[0], 0, 255) +
                 ', ' + keepWithin(rgba[1], 0, 255) +
                 ', ' + keepWithin(rgba[2], 0, 255) +
@@ -749,6 +749,7 @@
                 ', ' + keepWithin(rgba[1], 0, 255) +
                 ', ' + keepWithin(rgba[2], 0, 255) + ')';
         }
+
         return (isRgb(string)) ? output : false;
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/jquery-minicolors.git



More information about the Pkg-javascript-commits mailing list