document.getElementById('img-rotation').oninput = function() { // rect.set('angle', this.value); // remove this rect.rotate(this.value) // add this,value in degree })