Commit aa95d194 by doszhang

dos

parent 2350f6b8
......@@ -232,7 +232,7 @@ $(document).ready(function () {
uploadctx.translate(uploadedImg.width / 2, uploadedImg.height / 2);
uploadctx.scale(scale, scale);
uploadctx.rotate(Math.PI / 180 * rotation);
// uploadctx.drawImage(objectImg, -objectImg.width / 2, -objectImg.height / 2);
uploadctx.drawImage(objectImg, -objectImg.width / 2, -objectImg.height / 2);
// $('.canvas').html( '<img src="'+base64Img+'">');
drawImage();
......@@ -258,6 +258,7 @@ var init = function () {
}
var drawImage = function () {
if (uploadedImg) {
alert(uploadedImg.width)
ctx.save();
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = "#ffffff";
......
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