Allowing half opened panel.

Code from issue #9 from user @nagiobeid.
Fix dispatching OnPanelExpand/Collapsed.

Since the only fixed position is the collapsed we flip the assumption
for the check.