added autocenter and autozoom function to leg.