Set scale in JS.