Changing how dimensions for canvas are calculated - css scales vertical and horizontal differently rendering undesired effects