Commit 34714c4b authored by Luc Didry's avatar Luc Didry
Browse files

Fix bug in color selection

parent 2f4f5f97
......@@ -736,7 +736,7 @@ function colorToRGBA(color, alpha) {
var a = color.split('');
r = parseInt(''+a[1]+a[2], 16);
g = parseInt(''+a[3]+a[4], 16);
b = parseInt(''+a[4]+a[6], 16);
b = parseInt(''+a[5]+a[6], 16);
return 'rgba('+r+','+g+','+b+','+(100 - alpha/100)+')';
}
......
......@@ -54,7 +54,7 @@ else{var i={tl:0,tr:0,br:0,bl:0}
for(var c in i)o[c]=o[c]||i[c]}e.beginPath(),e.moveTo(a+o.tl,t),e.lineTo(a+s-o.tr,t),e.quadraticCurveTo(a+s,t,a+s,t+o.tr),e.lineTo(a+s,t+r-o.br),e.quadraticCurveTo(a+s,t+r,a+s-o.br,t+r),e.lineTo(a+o.bl,t+r),e.quadraticCurveTo(a,t+r,a,t+r-o.bl),e.lineTo(a,t+o.tl),e.quadraticCurveTo(a,t,a+o.tl,t),e.closePath(),n&&e.fill(),l&&e.stroke()}function show(e){var a=$("#"+e)
a.hasClass("d-none")&&a.removeClass("d-none")}function hide(e){var a=$("#"+e)
a.hasClass("d-none")||a.addClass("d-none")}function scalePreserveAspectRatio(e,a,t,s){return Math.min(t/e,s/a)}function colorToRGBA(e,a){var t=e.split("")
return r=parseInt(""+t[1]+t[2],16),g=parseInt(""+t[3]+t[4],16),b=parseInt(""+t[4]+t[6],16),"rgba("+r+","+g+","+b+","+(100-a/100)+")"}function createCookie(e,a,t){if(t){var s=new Date
return r=parseInt(""+t[1]+t[2],16),g=parseInt(""+t[3]+t[4],16),b=parseInt(""+t[5]+t[6],16),"rgba("+r+","+g+","+b+","+(100-a/100)+")"}function createCookie(e,a,t){if(t){var s=new Date
s.setTime(s.getTime()+24*t*60*60*1e3)
var r="; expires="+s.toGMTString()}else var r=""
document.cookie=e+"="+a+r+"; path=/"}function readCookie(e){for(var a=e+"=",t=document.cookie.split(";"),s=0;s<t.length;s++){for(var r=t[s];" "==r.charAt(0);)r=r.substring(1,r.length)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment