update horizonal gap