Add panGesture for rootView when open left or right menu.
clear the code