mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-23 00:06:18 -04:00
Fix animation color on older webkit/blink based browsers
This commit is contained in:
parent
b8a973f037
commit
800d492da5
2 changed files with 3 additions and 4 deletions
|
@ -98,8 +98,7 @@ function drawCircle(ctx, radius) {
|
|||
if (ctx.setStrokeColor) {
|
||||
// older blink/webkit based browsers do not understand opacity in strokeStyle. Use deprecated setStrokeColor instead
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeStyle#webkitblink-specific_note
|
||||
let baseColorRgb = baseColor.split(" ");
|
||||
ctx.setStrokeColor(baseColorRgb[0], baseColorRgb[1], baseColorRgb[2], opacity);
|
||||
ctx.setStrokeColor("grey", opacity);
|
||||
}
|
||||
else {
|
||||
ctx.strokeStyle = `rgb(${baseColor} / ${opacity})`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue