set translate in javascript code example
Example 1: js transform rotate
object.style.transform="rotate(7deg)";
Example 2: js canvas translate
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillRect(10, 10, 100, 50);
ctx.translate(70, 70);
ctx.fillRect(10, 10, 100, 50);