update position based on UI elements