chore: update @idraw/board examples

This commit is contained in:
chenshenhai 2021-11-15 22:58:20 +08:00
parent 8230fe2598
commit 469be6c867

View file

@ -6,8 +6,8 @@ export function drawData(board, idx) {
const helperCtx = board.getHelperContext();
const data = getData();
board.clear();
ctx.clearRect(0, 0, opts.width, opts.height);
helperCtx.clearRect(0, 0, opts.width, opts.height);
ctx.clearRect(0, 0, opts.devicePixelRatio * opts.contextWidth, opts.devicePixelRatio * opts.contextHeight);
helperCtx.clearRect(0, 0, opts.devicePixelRatio * opts.contextWidth, opts.devicePixelRatio * opts.contextHeight);
// ctx.setFillStyle('#ffffff');
// ctx.fillRect(0, 0, opts.width, opts.height);