change rectwidth in js