Javascript, css: change transform origin to centerpoint of gesturechange
问题 I would like to change the transform origin to the center point of the pinch gesture. This working code (safariDevSample) applies scale and rotation without changing the transform-origin : window.angle = 0; //global to store data for later reset .... var newAngle; window.scale = 1; var newScale; function saveChanges() { window.angle = newAngle; window.scale = newScale; } function getAngleAndScale(e) { // Don't zoom or rotate the whole screen e.preventDefault(); newAngle = window.angle + e