fix: @idraw/core clear context size

This commit is contained in:
chenshenhai 2021-08-06 14:26:02 +08:00
parent 63268810e6
commit e0e7d5799c

View file

@ -28,7 +28,7 @@ export function drawContext(
): void {
clearContext(ctx);
const size = ctx.getSize();
ctx.clearRect(0, 0, size.width, size.height);
ctx.clearRect(0, 0, size.contextWidth, size.contextHeight);
if (typeof data.bgColor === 'string' && isColorStr(data.bgColor)) {
drawBgColor(ctx, data.bgColor);