Commit 0e9c541e by doszhang

dos

parent adda1807
......@@ -794,7 +794,7 @@ function initCanvas(target, id, canvasWidth, canvasHeight, useRem = false) {
canvasWidth = pxToRem(canvasWidth);
canvasHeight = pxToRem(canvasHeight);
}
$(target).html('<canvas id="' + id + '" width="' + canvasWidth + '" height="' + canvasHeight + '"></canvas>');
$(target).append($('<canvas id="' + id + '" width="' + canvasWidth + '" height="' + canvasHeight + '"></canvas>'));
canvas = $('#' + id)[0];
ctx = canvas.getContext("2d");
ctx.scale(2, 2);
......
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 sign in to comment