add api to maximize viewer