Allow drawRect to accept and handle style.lineWidth

Allow drawRect to accept and handle style.lineWidth
pull/315/head
kieat 7 years ago committed by GitHub
parent 0a295f537e
commit 898fa1fc09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,7 @@ export default {
drawRect: function(pos, size, ctx, style){ drawRect: function(pos, size, ctx, style){
ctx.strokeStyle = style.color; ctx.strokeStyle = style.color;
ctx.fillStyle = style.color; ctx.fillStyle = style.color;
ctx.lineWidth = 1; ctx.lineWidth = style.lineWidth || 1;
ctx.beginPath(); ctx.beginPath();
ctx.strokeRect(pos.x, pos.y, size.x, size.y); ctx.strokeRect(pos.x, pos.y, size.x, size.y);
}, },

Loading…
Cancel
Save