Add dimensions in JS