Created by: davidluuAU
If anchor point is set, then the panel will stop at the anchor point first before going to the expanded or collapsed state. This is unless the user has scrolled past the anchor point.
I have also removed unnecessary conditions and simplified the if statements in onViewReleased()