The below javascript is called on gesturechange event of an image.In this code everything works fine except the line imgId.style.webkitTransform = tString; transform is not happening after getting the scaling value.
function getAngleAndScale(e) {
var imgId = e.target.id;
alert(imgId);
var scale = 1;
var newScale;
// Don't zoom or rotate the whole screen
e.preventDefault();
newScale = scale * e.scale;
var tString = "scale(" + newScale + ")";
imgId.style.webkitTransform = tString;
}
any other way to do this? thanks
AFAIR prefixed names (of CSS properties) should have first letter uppercased.
CSS: -webkit-transform
JS: WebkitTransform
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.