简体   繁体   English

单击按钮时图像消失

[英]Image disappears when clicking button

Why does the image disappear when I click button Rotate Anti-clockwise and Rotate clock-clockwise? 当我单击“逆时针旋转”和“顺时针旋转”按钮时,为什么图像消失了?

https://plnkr.co/edit/YFFx7oWnH1V2ppmtZWxW?p=preview https://plnkr.co/edit/YFFx7oWnH1V2ppmtZWxW?p=preview

function drawImage() {
     clear();
    element.save();
    element.scale(currentScale, currentScale);
    element.rotate(currentAngle * Math.PI / 180);
    element.drawImage(image, canvas.width/2/currentScale - image.width/2, canvas.height/2/currentScale - image.height/2);
    element.restore();
}

any update ? 任何更新 ?

check the below link it is working 检查以下链接是否正常

click this link http://jsfiddle.net/sreenivas644/CPKmN/576 click this link http://jsfiddle.net/sreenivas644/CPKmN/576

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM