javascript resize controller update