fixed rightpanel overlapping leftpanel issue

If the user starts dragging the center panel to show the right panel, but then drags the other way to show the left panel, the right panel would be visible on the left side, overlapping the left panel until the user let go of the center panel. 

This pull request fixes that issue by preventing the user to start dragging the center panel in one direction and then dragging it the other way.