add make center feature for dialog