Commit 69cac9a9 by doszhang

dos

parent fae76279
......@@ -65,7 +65,6 @@ preloadimages(preloadImageList, function () {
let canvasinfo = initCanvas('.black', 'uploadCanvas', 257, 257);
uploadCanvas = canvasinfo[0];
uploadCtx = canvasinfo[1];
console.log(blackUrl)
}, function (progress) {});
$(document).ready(function () {
......@@ -92,7 +91,9 @@ $(document).ready(function () {
}, imgInfo);
return false;
});
$('.btn-retry').on('click', () => {
$('input[name=btn-upload]').click()
})
});
function bindMc(mc, ctx, myCanvas, img, imgInfo) {
......@@ -214,13 +215,11 @@ function drawImage(ctx, myCanvas, img, imgInfo) {
}
function initCanvas(target, id, canvasWidth, canvasHeight, useRem = false) {
console.log(1);
if (useRem) {
canvasWidth = pxToRem(canvasWidth);
canvasHeight = pxToRem(canvasHeight);
}
black = loadedImages[blackUrl];
console.log(black)
$(target).append($('<canvas id="' + id + '" width="' + canvasWidth + '" height="' + canvasHeight + '"></canvas>'));
canvas = $('#' + id)[0];
ctx = canvas.getContext("2d");
......
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